Documentation
¶
Index ¶
- func FindTeam(teamName string)
- func GetChannel(channelName string)
- func GetDirectMessageChannel(recipient string)
- func PostMessage(msg string)
- func SendNextFrame(msg string)
- func SetupGracefulShutdown()
- func StartMattermostClient(serverAddr string, username string, password string)
- type MattermostData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindTeam ¶
func FindTeam(teamName string)
FindTeam creates a request for the specified Team name and quietly updates the stored team if found, exiting with an error on failure.
func GetChannel ¶
func GetChannel(channelName string)
GetChannel creates a request for the specified Channel via its name and quietly updates the stored channel if found, exiting with an error on failure.
func GetDirectMessageChannel ¶
func GetDirectMessageChannel(recipient string)
GetDirectMessageChannel searches for a user via given username and quietly updates the recipient struct if found, exiting with an error message on failure.
func PostMessage ¶
func PostMessage(msg string)
PostMessage sends a message to the stored channel, quietly updating the post struct with the successful response data, and exiting with an error message on failure.
func SendNextFrame ¶
func SendNextFrame(msg string)
SendNextFrame updates the post stored via PostMessage with the string passed in.
func SetupGracefulShutdown ¶
func SetupGracefulShutdown()
SetupGracefulShutdown closes websockets on detection of program exiting.
func StartMattermostClient ¶
StartMattermostClient creates a client struct, logs in the user from given arguments, and sets up a service to gracefully shut down.
Types ¶
type MattermostData ¶
MattermostData holds login-adjacent data for Mattermost.
func LoadMattermostData ¶
func LoadMattermostData(filename string) MattermostData
LoadMattermostData reads Mattermost credentials from a yaml file and returns a struct containing this unmarshalled data.