rest

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2019 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Overview

Package rest exposes a simple API for posting emails

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBadFormat = errors.New("invalid format")
)

Functions

func ValidateFormat

func ValidateFormat(email string) error

Types

type MailerHandler

type MailerHandler struct{}

MailerHandler provides implementation of method interfaces to communicate with the configured MTA for this instance

func (*MailerHandler) Filter

func (mh *MailerHandler) Filter() func(string) string

Filter returns a function to filter the swagger path

func (*MailerHandler) ResolveUser

func (mh *MailerHandler) ResolveUser(ctx context.Context, user *mailer.User) (*mailer.User, error)

func (*MailerHandler) Send

func (mh *MailerHandler) Send(req *restful.Request, rsp *restful.Response)

Send puts a mail in the queue to be send

func (*MailerHandler) SwaggerTags

func (mh *MailerHandler) SwaggerTags() []string

SwaggerTags list the names of the service tags declared in the swagger json implemented by this service

Jump to

Keyboard shortcuts

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