Documentation ¶
Overview ¶
Package messengers defines clients for the messaging services such as Slack. The clients reports the results of the pipeline stages and whole results.
Package messengers provides all functionality for the suported messengers ¶
Package messengers provides all functionality for the suported messengers ¶
Package messengers provides all functionality for the suported messengers ¶
Package messengers provides all functionality for the suported messengers
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseMessenger ¶ added in v1.2.0
type BaseMessenger struct {
SuppressFields []string `config:"suppress"`
}
BaseMessenger struct
func (*BaseMessenger) Post ¶ added in v1.2.0
func (baseMessenger *BaseMessenger) Post(messege string) bool
Post posts the supplied message
func (*BaseMessenger) Suppress ¶ added in v1.2.0
func (baseMessenger *BaseMessenger) Suppress(outputType string) bool
Suppress idenitifies if the supplied output type is a suppressed field
type FakeMessenger ¶
type FakeMessenger struct {
BaseMessenger
}
FakeMessenger is a Messenger type used only for testing.
type FakeSlack ¶ added in v0.2.0
type FakeSlack Slack
FakeSlack To avoid the infinite recursion (see http://stackoverflow.com/questions/23045884/can-i-use-marshaljson-to-add-arbitrary-fields-to-a-json-encoding-in-golang)
type HipChat ¶
type HipChat struct { BaseMessenger `config:"suppress"` RoomID string `config:"room_id"` Token string `config:"token"` From string `config:"from"` }
HipChat is a client which reports the pipeline results to the HipChat server. The client uses V1 of the HipChat API.
type HipChat2 ¶ added in v0.2.0
type HipChat2 struct { BaseMessenger `config:"suppress"` RoomID string `config:"room_id"` Token string `config:"token"` From string `config:"from"` BaseURL string `config:"base_url"` // contains filtered or unexported fields }
HipChat2 is a client which reports the pipeline results to the HipChat server. The client uses V2 of the HipChat API.
type Messenger ¶
Messenger is a interface for notifying the result to the messeging services such as Slack or HipChat.
func InitMessenger ¶
InitMessenger generates a spefified Messenger client objet.
type Slack ¶ added in v0.2.0
type Slack struct { BaseMessenger `config:"suppress"` Channel string `config:"channel" json:"channel"` UserName string `config:"username" json:"username"` IconEmoji string `config:"icon" json:"icon_emoji,omitempty"` IconURL string `config:"icon_url" json:"icon_url,omitempty"` IncomingURL string `config:"url" json:"-"` // not map to json }
Slack is a client which reports the pipeline results to the Slack chennel.