mail

package
v0.0.0-...-1c93661 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2016 License: GPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Nil = new(nilMailer)

Nil is a Mailer that does nothing.

Functions

func WriteMessage

func WriteMessage(w http.ResponseWriter, m Message, tmpl assets.Template)

Types

type Annotation

type Annotation struct {
	File       string
	LineNumber int
	LHS        string
	RHS        string
	Comment    string
}

Annotation is a simplified representation of a review.Annotation

func (Annotation) CommentLines

func (a Annotation) CommentLines() int

Returns the number of lines in the Comment.

type Mailer

type Mailer interface {
	NotifyReviewPosted(Message) error
	NotifyReviewAnnotated(Message) error
}

Mailer sends e-mail. It is purpose-built for sending specific messages.

func NewMailer

func NewMailer(server, broker string, auth smtp.Auth) Mailer

NewMailer returns a mailer that will send mail from broker@server. If server == "", then Mailer will be Nil.

type Message

type Message struct {
	Sender     string
	Recipient  string
	Repository string
	ReviewURL  string

	Annotations []Annotation
}

Message represents a message sent by the server to Recipient on behalf of Sender.

Jump to

Keyboard shortcuts

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