Documentation ¶
Index ¶
Constants ¶
View Source
const ( ColourYellow Colour = "yellow" ColourRed = "red" ColourGreen = "green" ColourPurple = "purple" ColourGrey = "gray" ColourRandom = "random" )
Variables ¶
View Source
var ValidColours = map[Colour]bool{ ColourYellow: true, ColourRed: true, ColourGreen: true, ColourPurple: true, ColourGrey: true, ColourRandom: true, }
View Source
var ValidFormats = map[Format]bool{ FormatHtml: true, FormatText: true, }
Functions ¶
Types ¶
type HttpNotifier ¶
type HttpNotifier struct {
// contains filtered or unexported fields
}
HttpNotifier is a notifier that talks to the Hipchat API via HTTP
func NewHttpNotifier ¶
func NewHttpNotifier() *HttpNotifier
NewHttpNotifier mints an HTTP notifier, configuring it from the config service
func (*HttpNotifier) Notify ¶
func (n *HttpNotifier) Notify(msg *Message) error
Notify sends a message
type Message ¶
type Message struct { Room string // Room name or ID From string // From is who we are sending the message from Body string // Body is the message content Format Format // Format that the body is supplied in; text or html Notify bool // Notify indicates we want to make the Hipchat icon bounce around like mad and annoy people Colour Colour // Colour is the background colour of the announcement }
Message represents some message we send
Click to show internal directories.
Click to hide internal directories.