Formatted to pass go fmt.
This commit is contained in:
@@ -11,9 +11,8 @@ import (
|
||||
"github.com/42wim/matterbridge/bridge/config"
|
||||
"github.com/labstack/echo"
|
||||
"github.com/labstack/echo/middleware"
|
||||
"github.com/zfjagann/golang-ring"
|
||||
"github.com/swaggo/echo-swagger"
|
||||
_ "github.com/42wim/matterbridge/docs"
|
||||
"github.com/zfjagann/golang-ring"
|
||||
)
|
||||
|
||||
// @title Matterbridge API
|
||||
@@ -59,7 +58,9 @@ func New(cfg *bridge.Config) bridge.Bridger {
|
||||
},
|
||||
Skipper: func(c echo.Context) bool {
|
||||
for _, path := range strings.Fields("/ /api /api/health /swagger /swagger/*") {
|
||||
if c.Path() == path { return true }
|
||||
if c.Path() == path {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
},
|
||||
|
||||
@@ -28,30 +28,30 @@ const (
|
||||
|
||||
type Message struct {
|
||||
// Content of the message
|
||||
Text string `json:"text" example:"Testing, testing, 1-2-3."`
|
||||
Text string `json:"text" example:"Testing, testing, 1-2-3."`
|
||||
// Human-readable channel name
|
||||
Channel string `json:"channel" example:"test-channel"`
|
||||
Channel string `json:"channel" example:"test-channel"`
|
||||
// Human-readable username
|
||||
Username string `json:"username" example:"alice"`
|
||||
Username string `json:"username" example:"alice"`
|
||||
// userid on the bridge
|
||||
UserID string `json:"userid" example:"U4MCXJKNC"`
|
||||
UserID string `json:"userid" example:"U4MCXJKNC"`
|
||||
// URL to an avatar image
|
||||
Avatar string `json:"avatar" example:"https://secure.gravatar.com/avatar/1234567890abcdef1234567890abcdef.jpg"`
|
||||
Avatar string `json:"avatar" example:"https://secure.gravatar.com/avatar/1234567890abcdef1234567890abcdef.jpg"`
|
||||
// Unique account name of format "[protocol].[slug]"
|
||||
Account string `json:"account" example:"slack.myteam"`
|
||||
Account string `json:"account" example:"slack.myteam"`
|
||||
// Can be blank.
|
||||
Event string `json:"event" example:""`
|
||||
Event string `json:"event" example:""`
|
||||
// Chat protocol of incoming message
|
||||
Protocol string `json:"protocol" example:"slack"`
|
||||
Protocol string `json:"protocol" example:"slack"`
|
||||
// Name of the gateway
|
||||
Gateway string `json:"gateway" example:"test-channel-gateway"`
|
||||
Gateway string `json:"gateway" example:"test-channel-gateway"`
|
||||
// Unique ID of a parent message, if threaded
|
||||
ParentID string `json:"parent_id"`
|
||||
Timestamp time.Time `json:"timestamp" example:"1541361213.030700"`
|
||||
// Unique ID of message on the gateway
|
||||
ID string `json:"id" example:"slack 1541361213.030700"`
|
||||
ID string `json:"id" example:"slack 1541361213.030700"`
|
||||
// Extra data that doesn't fit in other fields. Used for processing incoming messages.
|
||||
Extra map[string][]interface{}
|
||||
Extra map[string][]interface{}
|
||||
}
|
||||
|
||||
type FileInfo struct {
|
||||
|
||||
Reference in New Issue
Block a user