common

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

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

Go to latest
Published: Dec 10, 2018 License: MIT Imports: 0 Imported by: 1

Documentation

Index

Constants

View Source
const DEFAULT_TAG = "default"

DEFAULT_TAG is name of default tag

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger interface {
	GetChannel() chan<- *MailLog
}

Logger is logger interface for service log

type MailLog

type MailLog struct {
	MailMsg
	Requeue bool
	Error   error
	Retry   int
}

MailLog is struct of mail log

type MailMsg

type MailMsg struct {
	From    string   `json:"from" validate:"required,email"`
	To      []string `json:"to" validate:"required,dive,email"`
	Subject string   `json:"subject"`
	Body    string   `json:"body" validate:"required"`
	// Tag is not part of email, we use it for analysing
	Tag string `json:"tag"`
	// ID is uuid of this message
	ID string `json:"id" validate:"required"`
}

MailMsg is msg we received from rabbit mq

type Sender

type Sender interface {
	Send(mail MailMsg) (error, bool)
}

Sender is interface of mail sender

Jump to

Keyboard shortcuts

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