notify

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2014 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	// Global settings
	Host string

	// User that owns the repository
	User *model.User

	// Repository being built.
	Repo *model.Repo

	// Commit being built
	Commit *model.Commit
}

Context represents the context of an in-progress build request.

type Email

type Email struct {
	Recipients []string `yaml:"recipients,omitempty"`
	Success    string   `yaml:"on_success"`
	Failure    string   `yaml:"on_failure"`
}

func (*Email) Send

func (e *Email) Send(context *Context) error

Send will send an email, either success or failure, based on the Commit Status.

type Hipchat

type Hipchat struct {
	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 *Context) error

type IRC

type IRC struct {
	Channel       string `yaml:"channel,omitempty"`
	Nick          string `yaml:"nick,omitempty"`
	Server        string `yaml:"server,omitempty"`
	Started       bool   `yaml:"on_started,omitempty"`
	Success       bool   `yaml:"on_success,omitempty"`
	Failure       bool   `yaml:"on_failure,omitempty"`
	SSL           bool   `yaml:"ssl,omitempty"`
	ClientStarted bool
	Client        *irc.Conn
}

func (*IRC) Connect

func (i *IRC) Connect()

func (*IRC) Send

func (i *IRC) Send(context *Context) error

type Notification

type Notification struct {
	Email   *Email   `yaml:"email,omitempty"`
	Webhook *Webhook `yaml:"webhook,omitempty"`
	Hipchat *Hipchat `yaml:"hipchat,omitempty"`
	Irc     *IRC     `yaml:"irc,omitempty"`
}

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 *Context) error

type Sender

type Sender interface {
	Send(context *Context) error
}

type Webhook

type Webhook struct {
	URL     []string `yaml:"urls,omitempty"`
	Success bool     `yaml:"on_success,omitempty"`
	Failure bool     `yaml:"on_failure,omitempty"`
}

func (*Webhook) Send

func (w *Webhook) Send(context *Context) error

Jump to

Keyboard shortcuts

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