notifier

package
v0.0.0-...-e115b17 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2016 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Send

func Send(c context.Context, n *Notification) error

Send sends a notification to the list of maintainers indicating a commit is ready for their review and possible approval.

func ToContext

func ToContext(c Setter, s Sender)

ToContext adds the Sender to this context if it supports the Setter interface.

Types

type Commit

type Commit struct {
	Repo    string
	Message string
	Author  string
	Link    string
}

Commit represents the commit for which we are notifiying the maintainers.

type Notification

type Notification struct {
	Reviewers []*Reviewer
	Commit    *Commit
}

Notification represents a notification that we are sending to a list of maintainers indicating a commit is ready for their review and, hopefully, approval.

type Reviewer

type Reviewer struct {
	Login string
	Email string
}

Reviewer represents a repository maintainer or contributor that is being notified of a commit to review.

type Sender

type Sender interface {
	Send(*Notification) error
}

Sender defines a notification provider that is capable of sending out notifications to a list of maintainers or reviewers. An example provider might be a Slack or GitHub bot.

func FromContext

func FromContext(c context.Context) Sender

FromContext returns the Sender associated with this context.

type Setter

type Setter interface {
	Set(string, interface{})
}

Setter defines a context that enables setting values.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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