Documentation ¶
Index ¶
- Constants
- func CreateBotDebuggingChannelIfNeeded(ch Channel)
- func FindBotTeam(t string)
- func HandleMsgFromDebuggingChannel(event *model.WebSocketEvent)
- func HandleWebSocketResponse(event *model.WebSocketEvent)
- func InitialLoad()
- func LoginAsTheBotUser(bot Bot)
- func MakeSureServerIsRunning()
- func PrintError(err *model.AppError)
- func Run()
- func RunBot(config Config)
- func SendMsgToDebuggingChannel(msg string, replyToId string)
- func SetupGracefulShutdown()
- func UpdateTheBotUserIfNeeded(bot Bot)
- type Bot
- type Channel
- type Config
- type Mattermost
- type Service
Constants ¶
View Source
const ConfigFileName = "config.json"
Variables ¶
This section is empty.
Functions ¶
func CreateBotDebuggingChannelIfNeeded ¶
func CreateBotDebuggingChannelIfNeeded(ch Channel)
func FindBotTeam ¶
func FindBotTeam(t string)
func HandleMsgFromDebuggingChannel ¶
func HandleMsgFromDebuggingChannel(event *model.WebSocketEvent)
func HandleWebSocketResponse ¶
func HandleWebSocketResponse(event *model.WebSocketEvent)
func InitialLoad ¶
func InitialLoad()
func LoginAsTheBotUser ¶
func LoginAsTheBotUser(bot Bot)
func MakeSureServerIsRunning ¶
func MakeSureServerIsRunning()
func PrintError ¶
func RunBot ¶
func RunBot(config Config)
Documentation for the Go driver can be found at https://godoc.org/github.com/mattermost/platform/model#Client
func SetupGracefulShutdown ¶
func SetupGracefulShutdown()
func UpdateTheBotUserIfNeeded ¶
func UpdateTheBotUserIfNeeded(bot Bot)
Types ¶
type Config ¶
type Config struct { Mattermost Mattermost `json:"mattermost"` Gopher string `json:"gopher"` MaxOfGophers int `json:"max_of_gophers"` }
type Mattermost ¶
type Mattermost struct { Host string `json:"host"` Port string `json:"port"` Bot Bot `json:"bot"` Team string `json:"team"` Channel Channel `json:"channel"` }
func (*Mattermost) HttpURL ¶
func (m *Mattermost) HttpURL() string
func (*Mattermost) WsURL ¶
func (m *Mattermost) WsURL() string
Click to show internal directories.
Click to hide internal directories.