oddmail

package
v0.0.0-...-5acab9f Latest Latest
Warning

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

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

Documentation

Overview

Package oddmail is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EmailService

type EmailService interface {
	Send(from string, toAddresses []string, ccAddresses []string, subject string, contentType string, body string) error
	GetConfig() EmailServiceConfig
}

EmailService is an interface for any service capable of sending emails

type EmailServiceConfig

type EmailServiceConfig interface {
	GetEnabled() bool
	GetHost() string
	GetClientAddress() string
	GetPort() int
	GetUsername() string
	GetPassword() string
	GetSendTaggedPOCEmails() bool
}

EmailServiceConfig is an interface for email services

type GoSimpleMailService

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

GoSimpleMailService is an EmailService implementation for the GoSimpleMail library

func NewGoSimpleMailService

func NewGoSimpleMailService(config GoSimpleMailServiceConfig) (*GoSimpleMailService, error)

NewGoSimpleMailService is a constructor for GoSimpleMailService

func (GoSimpleMailService) GetConfig

GetConfig returns this service's configuration

func (GoSimpleMailService) Send

func (g GoSimpleMailService) Send(from string, toAddresses []string, ccAddresses []string, subject string, contentType string, body string) error

Send uses the GoSimpleMailService to dispatch an email with the provided settings

func (GoSimpleMailService) SendEmail

func (g GoSimpleMailService) SendEmail(email *mail.Email) error

SendEmail is a GoSimpleMail specific method allowing for dispatching an email using a mail.Email object

type GoSimpleMailServiceConfig

type GoSimpleMailServiceConfig struct {
	Enabled               bool
	Helo                  string
	Host                  string
	ClientAddress         string
	Port                  int
	Authentication        mail.AuthType
	Username              string
	Password              string
	Encryption            mail.Encryption
	ConnectTimeout        time.Duration
	SendTimeout           time.Duration
	KeepAlive             bool
	TLSConfig             *tls.Config
	TaggedPOCEmailEnabled bool // this determines if a solution point of contact gets an email sent to them if they are tagged
}

GoSimpleMailServiceConfig is a configuration structure to define the behavior of a GoSimpleMailService

func (*GoSimpleMailServiceConfig) GetAuthentication

func (g *GoSimpleMailServiceConfig) GetAuthentication() mail.AuthType

GetAuthentication returns the Authentication configuration

func (*GoSimpleMailServiceConfig) GetClientAddress

func (g *GoSimpleMailServiceConfig) GetClientAddress() string

GetClientAddress returns the ClientAddress configuration

func (*GoSimpleMailServiceConfig) GetConnectTimeout

func (g *GoSimpleMailServiceConfig) GetConnectTimeout() time.Duration

GetConnectTimeout returns the ConnectTimeout configuration

func (*GoSimpleMailServiceConfig) GetEnabled

func (g *GoSimpleMailServiceConfig) GetEnabled() bool

GetEnabled returns the Enabled configuration

func (*GoSimpleMailServiceConfig) GetEncryption

func (g *GoSimpleMailServiceConfig) GetEncryption() mail.Encryption

GetEncryption returns the Encryption configuration

func (*GoSimpleMailServiceConfig) GetHelo

func (g *GoSimpleMailServiceConfig) GetHelo() string

GetHelo returns the Helo configuration

func (*GoSimpleMailServiceConfig) GetHost

func (g *GoSimpleMailServiceConfig) GetHost() string

GetHost returns the Host configuration

func (*GoSimpleMailServiceConfig) GetHostName

func (g *GoSimpleMailServiceConfig) GetHostName() string

GetHostName returns the HostName configuration

func (*GoSimpleMailServiceConfig) GetKeepAlive

func (g *GoSimpleMailServiceConfig) GetKeepAlive() bool

GetKeepAlive returns the KeepAlive configuration

func (*GoSimpleMailServiceConfig) GetPassword

func (g *GoSimpleMailServiceConfig) GetPassword() string

GetPassword returns the Password configuration

func (*GoSimpleMailServiceConfig) GetPort

func (g *GoSimpleMailServiceConfig) GetPort() int

GetPort returns Port configuration

func (*GoSimpleMailServiceConfig) GetSendTaggedPOCEmails

func (g *GoSimpleMailServiceConfig) GetSendTaggedPOCEmails() bool

GetSendTaggedPOCEmails returns the boolean configuration of if the app should send emails to tagged solution points of contacts

func (*GoSimpleMailServiceConfig) GetSendTimeout

func (g *GoSimpleMailServiceConfig) GetSendTimeout() time.Duration

GetSendTimeout returns the SendTimeout configuration

func (*GoSimpleMailServiceConfig) GetTLSConfig

func (g *GoSimpleMailServiceConfig) GetTLSConfig() *tls.Config

GetTLSConfig returns the TLSConfig configuration

func (*GoSimpleMailServiceConfig) GetUsername

func (g *GoSimpleMailServiceConfig) GetUsername() string

GetUsername returns the Username configuration

type MockEmailService

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

MockEmailService is a mock of EmailService interface.

func NewMockEmailService

func NewMockEmailService(ctrl *gomock.Controller) *MockEmailService

NewMockEmailService creates a new mock instance.

func (*MockEmailService) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockEmailService) GetConfig

func (m *MockEmailService) GetConfig() EmailServiceConfig

GetConfig mocks base method.

func (*MockEmailService) Send

func (m *MockEmailService) Send(from string, toAddresses, ccAddresses []string, subject, contentType, body string) error

Send mocks base method.

type MockEmailServiceMockRecorder

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

MockEmailServiceMockRecorder is the mock recorder for MockEmailService.

func (*MockEmailServiceMockRecorder) GetConfig

func (mr *MockEmailServiceMockRecorder) GetConfig() *gomock.Call

GetConfig indicates an expected call of GetConfig.

func (*MockEmailServiceMockRecorder) Send

func (mr *MockEmailServiceMockRecorder) Send(from, toAddresses, ccAddresses, subject, contentType, body interface{}) *gomock.Call

Send indicates an expected call of Send.

Jump to

Keyboard shortcuts

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