worker

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: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EmailGateway

type EmailGateway interface {
	Send(message RenderedTemplates) *EmailGatewayError
	Description() string
}

type EmailGatewayError

type EmailGatewayError struct {
	Cause             error
	IsConnectionError bool
}

func (*EmailGatewayError) Error

func (this *EmailGatewayError) Error() string

type EmailSender

type EmailSender struct {
	Gateway    EmailGateway
	Repository recipientsRepository.Repository
	// contains filtered or unexported fields
}

func (*EmailSender) Start

func (this *EmailSender) Start()

func (*EmailSender) Stop

func (this *EmailSender) Stop()

type LeaseExtender

type LeaseExtender struct {
	Repository        recipientsRepository.LeaseExtensionRepository
	JobId             string
	Receiver          string
	ExtensionInterval time.Duration
	// contains filtered or unexported fields
}

func (*LeaseExtender) Start

func (this *LeaseExtender) Start()

func (*LeaseExtender) Stop

func (this *LeaseExtender) Stop()

TODO: rename to StopAndRevoke and if stopped revoke lease (?)

type MandrillGateway

type MandrillGateway struct {
	ApiKey string
}

func (*MandrillGateway) Description

func (this *MandrillGateway) Description() string

func (*MandrillGateway) Send

type RenderedTemplates

type RenderedTemplates struct {
	Subject string
	Body    string

	ReceiverEmail string
	ReceiverName  string

	SenderEmail string
	SenderName  string

	ReplyToEmail string
}

func RenderTemplates

func RenderTemplates(templates recipientsRepository.Templates, recipient map[string]interface{}) (result RenderedTemplates, err error)

type SmtpEmailGateway

type SmtpEmailGateway struct {
	SmtpUrl  string
	SmtpAuth smtp.Auth
}

func (*SmtpEmailGateway) Description

func (this *SmtpEmailGateway) Description() string

func (*SmtpEmailGateway) Send

type WorkerError

type WorkerError struct {
	Message string
	Cause   error
}

func (*WorkerError) Error

func (this *WorkerError) Error() string

Jump to

Keyboard shortcuts

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