notify

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 17, 2015 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatusPending = ":raised_hand:"
	StatusSuccess = ":thumbsup:"
	StatusFailure = ":thumbsdown:"
	StatusError   = ":exclamation:"
)
View Source
const (
	DescPending = "this build is pending"
	DescSuccess = "the build was successful"
	DescFailure = "the build failed"
	DescError   = "oops, something went wrong"
)
View Source
const (
	PRMasterBranch = "master"
	PRBadToMerge   = " -> bad to merge"
	PRGoodToMerge  = " -> good to merge"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Gitlab

type Gitlab struct {
	SkipVerify bool `yaml:"skip_verify,omitempty"`
	Started    bool `yaml:"on_started,omitempty"`
	Success    bool `yaml:"on_success,omitempty"`
	Failure    bool `yaml:"on_failure,omitempty"`
}

func (*Gitlab) Send

func (g *Gitlab) Send(context *model.Request) error

Send uses the Gitlab repository API to comment the commit

type GitlabClient

type GitlabClient interface {
	SendRepoCommitComment(id string, sha string, body string) (*gogitlab.CommitComment, error)
}

type Gitter

type Gitter struct {
	RoomID  string `yaml:"room_id,omitempty"`
	Token   string `yaml:"token,omitempty"`
	Started bool   `yaml:"on_started,omitempty"`
	Success bool   `yaml:"on_success,omitempty"`
	Failure bool   `yaml:"on_failure,omitempty"`
}

func (*Gitter) Send

func (g *Gitter) Send(context *model.Request) error

type Hipchat

type Hipchat struct {
	Server  string `yaml:"server,omitempty"`
	Room    string `yaml:"room,omitempty"`
	Token   string `yaml:"token,omitempty"`
	Started bool   `yaml:"on_started,omitempty"`
	Success bool   `yaml:"on_success,omitempty"`
	Failure bool   `yaml:"on_failure,omitempty"`
}

func (*Hipchat) Send

func (h *Hipchat) Send(context *model.Request) error

func (*Hipchat) SendWithClient

func (h *Hipchat) SendWithClient(client HipchatClient, context *model.Request) error

type HipchatClient

type HipchatClient interface {
	PostMessage(req HipchatMessageRequest) error
}

type HipchatMessageRequest

type HipchatMessageRequest struct {
	Server    string
	RoomId    string
	Color     string
	Message   string
	Notify    bool
	AuthToken string
}

type HipchatSimpleHTTPClient

type HipchatSimpleHTTPClient struct{}

func (*HipchatSimpleHTTPClient) PostMessage

type Notification

type Notification struct {
	Email    *email.Email       `yaml:"email,omitempty"`
	Webhook  *webhook.Webhook   `yaml:"webhook,omitempty"`
	Hipchat  *Hipchat           `yaml:"hipchat,omitempty"`
	Irc      *irc.IRC           `yaml:"irc,omitempty"`
	Slack    *Slack             `yaml:"slack,omitempty"`
	Gitter   *Gitter            `yaml:"gitter,omitempty"`
	Flowdock *flowdock.Flowdock `yaml:"flowdock,omitempty"`
	KatoIM   *katoim.KatoIM     `yaml:"katoim,omitempty"`
	Gitlab   *Gitlab            `yaml:"gitlab,omitempty"`

	GitHub github.GitHub `yaml:"--"`
}

Notification stores the configuration details for notifying a user, or group of users, when their Build has completed.

func (*Notification) Send

func (n *Notification) Send(context *model.Request) error

type Sender

type Sender interface {
	Send(context *model.Request) error
}

type Slack

type Slack struct {
	WebhookUrl string `yaml:"webhook_url,omitempty"`
	Channel    string `yaml:"channel,omitempty"`
	Username   string `yaml:"username,omitempty"`
	Started    bool   `yaml:"on_started,omitempty"`
	Success    bool   `yaml:"on_success,omitempty"`
	Failure    bool   `yaml:"on_failure,omitempty"`
	Change     bool   `yaml:"on_change,omitempty"`
}

func (*Slack) Send

func (s *Slack) Send(context *model.Request) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL