diff --git a/bridge/api/api.go b/bridge/api/api.go index 682b4b98..1b8c0087 100644 --- a/bridge/api/api.go +++ b/bridge/api/api.go @@ -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 }, diff --git a/bridge/config/config.go b/bridge/config/config.go index e328f2eb..07892008 100644 --- a/bridge/config/config.go +++ b/bridge/config/config.go @@ -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 {