Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DiscordToken = os.Getenv("DISCORD_TOKEN") DiscordChannel = os.Getenv("DISCORD_CHANNEL") TriggerWordMattermost = os.Getenv("TRIGGER_WORD_MATTERMOST") MattermostToken = os.Getenv("MATTERMOST_TOKEN") DiscordTokenMissingMessage = "No discord token provided!" DiscordChannelMissingMessage = "No discord channel provided!" MattermostTriggerwordMissingMessage = "No trigger word provided!" )
Functions ¶
func HandleBotError ¶
func PanicIfDiscordBotMissesInformation ¶
func PanicIfDiscordBotMissesInformation()
func SetupServer ¶
Types ¶
type Bot ¶
type Bot interface { SendMessage(context *gin.Context) GetPayload(context *gin.Context) Payload GetContent(payload Payload) Content }
The interface to be implemented by the DiscordBot and the MattermostBot
type DiscordAPICheck ¶
type DiscordAPICheck struct {
Status *DiscordStatus `json:"status"`
}
type DiscordBot ¶
func CreateDiscordBot ¶
func CreateDiscordBot() *DiscordBot
func (*DiscordBot) GetContent ¶
func (*DiscordBot) GetContent(payload Payload) Content
func (*DiscordBot) GetPayload ¶
func (*DiscordBot) GetPayload(context *gin.Context) Payload
func (*DiscordBot) SendMessage ¶
func (bot *DiscordBot) SendMessage(context *gin.Context)
type DiscordPayload ¶
type DiscordPayload struct{}
type DiscordStatus ¶
type MattermostPayload ¶
type Payload ¶
type Payload struct { *DiscordPayload *MattermostPayload }
Click to show internal directories.
Click to hide internal directories.