Documentation
¶
Overview ¶
Package notification can be used to send notifications to your Slack team.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotConfigured = errgo.Newf("No notification receiver configured") ErrInvalidConfiguration = errgo.Newf("Invalid configuration") )
Functions ¶
func IsInvalidConfiguration ¶
func IsNotConfigured ¶
func SendMessage ¶
SendMessage reads the configuration file, and posts a message about Kocho's invocation to Slack.
func WriteConfig ¶
func WriteConfig(config SlackConfiguration) error
WriteConfig writes the given SlackConfiguration to the configuration file.
Types ¶
type SlackConfiguration ¶
type SlackConfiguration struct { Token string `json:"token"` // Token is the API token from Slack. Username string `json:"username"` // Username is your username. NotificationUsername string `json:"notification_username,omitempty"` // NotificationUsername is the username the notification should be posted under. EmojiIcon string `json:"emoji_icon,omitempty"` // EmojiIcon is an emoji (e.g: :smile:) to use as an avatar for the notification. NotificationChannel string `json:"notification_channel"` // NotificationChannel is the channel to post to. }
SlackConfiguration describes a configuration for posting to a Slack channel.
Click to show internal directories.
Click to hide internal directories.