router

package
v0.0.0-...-fbe4437 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2018 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetJobIdsFrom

func GetJobIdsFrom(request *web.Request) (jobIds []string, err error)

Types

type Blacklist

type Blacklist struct {
	Emails Set
}

func CreateBlacklistFromFile

func CreateBlacklistFromFile(path string) (blacklist Blacklist, err error)

func (*Blacklist) Contains

func (this *Blacklist) Contains(recipient string) bool

func (*Blacklist) IsEmpty

func (this *Blacklist) IsEmpty() bool

type RecipientListImporterJob

type RecipientListImporterJob struct {
	Target               recipientsRepository.Repository
	SourceRecipientsList string
	Key                  string
	Templates            recipientsRepository.TemplatesString
	Blacklist            Blacklist
	// contains filtered or unexported fields
}

func (*RecipientListImporterJob) Execute

func (this *RecipientListImporterJob) Execute() error

func (*RecipientListImporterJob) ExecuteAndLogErrors

func (this *RecipientListImporterJob) ExecuteAndLogErrors()

func (*RecipientListImporterJob) Prepare

func (this *RecipientListImporterJob) Prepare() error

type RedisConfiguration

type RedisConfiguration struct {
	RedisUrl  string
	Verbosity string
}

type RequestHandler

type RequestHandler struct {
	Repository          recipientsRepository.Repository
	ServerConfiguration ServerConfiguration
}

func (*RequestHandler) HandleAbortAndRemove

func (this *RequestHandler) HandleAbortAndRemove(response web.ResponseWriter, request *web.Request)

func (*RequestHandler) HandleSend

func (this *RequestHandler) HandleSend(response web.ResponseWriter, request *web.Request)

func (*RequestHandler) HandleSendingFailures

func (this *RequestHandler) HandleSendingFailures(response web.ResponseWriter, request *web.Request)

func (*RequestHandler) HandleServerConfiguration

func (this *RequestHandler) HandleServerConfiguration(response web.ResponseWriter, request *web.Request)

func (*RequestHandler) HandleStatus

func (this *RequestHandler) HandleStatus(response web.ResponseWriter, request *web.Request)

type SendRequestPayload

type SendRequestPayload struct {
	RecipientsList string
	Blacklist      string
	Templates      recipientsRepository.TemplatesString
}

func GetSendRequestPayloadFromRequest

func GetSendRequestPayloadFromRequest(request *web.Request) (payload SendRequestPayload, err error)

type Server

type Server struct {
	AuthToken           string
	Repository          recipientsRepository.Repository
	ServerConfiguration ServerConfiguration
}

func (*Server) Listen

func (this *Server) Listen() error

type ServerConfiguration

type ServerConfiguration struct {
	RedisConfiguration RedisConfiguration
	AuthToken          string
	EmailGateway       string
}

type ServerError

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

func (*ServerError) Error

func (this *ServerError) Error() string

type Set

type Set map[interface{}]struct{}

func CreateSetFromFile

func CreateSetFromFile(path string, processAndAddLine func(set *Set, line string)) (set Set, err error)

func (*Set) Add

func (this *Set) Add(item interface{})

func (*Set) Contains

func (this *Set) Contains(item interface{}) bool

func (*Set) IsEmpty

func (this *Set) IsEmpty() bool

type StatusRequestPayload

type StatusRequestPayload struct {
	JobIds []string
}

func GetStatusRequestPayloadFromRequest

func GetStatusRequestPayloadFromRequest(request *web.Request) (payload StatusRequestPayload, err error)

Jump to

Keyboard shortcuts

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