mmrender

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 22, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

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

func StartMattermostClient(serverAddr string, username string, password string)

StartMattermostClient creates a client struct, logs in the user from given arguments, and sets up a service to gracefully shut down.

Types

type MattermostData

type MattermostData struct {
	User      string
	Pass      string
	ServerURL string
	TeamName  string
}

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL