Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrQueueEmpty = errors.New("queue is empty")
Functions ¶
This section is empty.
Types ¶
type EmailTemplate ¶
type EmailTemplate interface { json.Marshaler EmailSubject() (string, error) EmailBody() (string, error) EmailBodyPlaintext() (string, error) EmailRecipient() (string, error) }
func NewEmailTemplateFromMessage ¶
func NewEmailTemplateFromMessage(c *config.Config, m Message) (EmailTemplate, error)
type Message ¶
type Message struct { ID uuid.UUID `json:"-" faker:"-" db:"id"` NID uuid.UUID `json:"-" faker:"-" db:"nid"` Status MessageStatus `json:"-" db:"status"` Type MessageType `json:"-" db:"type"` Recipient string `json:"-" db:"recipient"` Body string `json:"-" db:"body"` Subject string `json:"-" db:"subject"` TemplateType TemplateType `json:"-" db:"template_type"` TemplateData []byte `json:"-" db:"template_data"` // CreatedAt is a helper struct field for gobuffalo.pop. CreatedAt time.Time `json:"-" faker:"-" db:"created_at"` // UpdatedAt is a helper struct field for gobuffalo.pop. UpdatedAt time.Time `json:"-" faker:"-" db:"updated_at"` }
type MessageStatus ¶
type MessageStatus int
const ( MessageStatusQueued MessageStatus = iota + 1 MessageStatusSent MessageStatusProcessing )
type PersistenceProvider ¶
type PersistenceProvider interface {
CourierPersister() Persister
}
type TemplateType ¶
type TemplateType string
const ( TypeRecoveryInvalid TemplateType = "recovery_invalid" TypeRecoveryValid TemplateType = "recovery_valid" TypeVerificationInvalid TemplateType = "verification_invalid" TypeVerificationValid TemplateType = "verification_valid" TypeTestStub TemplateType = "stub" )
func GetTemplateType ¶
func GetTemplateType(t EmailTemplate) (TemplateType, error)
Click to show internal directories.
Click to hide internal directories.