mail

package
v0.0.0-...-62d34d7 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MailAttributes

type MailAttributes struct {
	To      []string
	Subject string
	Content string
}

MailAttributes contains E-Mail attributes

type MailService

type MailService interface {
	SendNotification(attributes MailAttributes) error
}

Service forwards E-Mail to a set of receivers

type MockMailService

type MockMailService struct {
	SendMails []MailAttributes
}

mocks a mail service and allow to access the receive messages

func (*MockMailService) SendNotification

func (service *MockMailService) SendNotification(attributes MailAttributes) error

type SendGridConfig

type SendGridConfig struct {
	APIKey        string
	OriginAddress string
	OriginName    string
}

SendGridConfig contain all attributes to initialize the SendGrid mail service

type SendGridService

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

SendGridService implements MailService

func NewSendGridService

func NewSendGridService(config *SendGridConfig) *SendGridService

NewSendGridService creates a SendGridService using an already initializes service

func (*SendGridService) SendNotification

func (service *SendGridService) SendNotification(attributes MailAttributes) error

Jump to

Keyboard shortcuts

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