app

package
v0.0.0-...-4e69e3f Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2018 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	// contains filtered or unexported fields
}

App represents a maild application.

func New

func New(loader Loader, sender Sender) *App

New creates a new mail app.

func (*App) SendMail

func (ap *App) SendMail(req model.Request) error

SendMail build email from template and sends it.

type ArgumentError

type ArgumentError struct {
	Err error
}

ArgumentError represents an error caused by user input.

func (ArgumentError) Error

func (e ArgumentError) Error() string

Error returns string representation of an argument error.

type Loader

type Loader interface {
	// Load loads a template with the language and name provided.
	Load(lang, name string) (io.Reader, error)
}

Loader represents interface of templates loader.

type Sender

type Sender interface {
	Send(model.Message) error
}

Sender represent inteface for an email sender.

Directories

Path Synopsis
fs

Jump to

Keyboard shortcuts

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