Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { standard.EnumlessConfig UserName string `url:"user" optional:"" desc:"Override webhook user"` Icon string `` /* 126-byte string literal not displayed */ Title string `key:"title" default:"" desc:"Notification title, optionally set by the sender (not used)"` Channel string `url:"path2" optional:"" desc:"Override webhook channel"` Host string `url:"host,port" desc:"Mattermost server host"` Token string `url:"path1" desc:"Webhook token"` }
Config object holding all information
func CreateConfigFromURL ¶ added in v0.6.0
CreateConfigFromURL to use within the mattermost service
type ErrorMessage ¶
type ErrorMessage string
ErrorMessage for error events within the mattermost service
const ( // Scheme is the identifying part of this service's configuration URL Scheme = "mattermost" // NotEnoughArguments provided in the service URL NotEnoughArguments ErrorMessage = "the apiURL does not include enough arguments, either provide 1 or 3 arguments (they may be empty)" )
type JSON ¶
type JSON struct { Text string `json:"text"` UserName string `json:"username,omitempty"` Channel string `json:"channel,omitempty"` IconEmoji string `json:"icon_emoji,omitempty"` IconURL string `json:"icon_url,omitempty"` }
JSON payload for mattermost notifications
type Service ¶
Service sends notifications to a pre-configured channel or user
func (*Service) Initialize ¶
Initialize loads ServiceConfig from configURL and sets logger for this Service
Click to show internal directories.
Click to hide internal directories.