Documentation ¶
Overview ¶
Package sendmail is a generated GoMock package.
Package sendmail is a generated GoMock package.
Index ¶
- Constants
- type DefaultNetDialerFactory
- type IMailSender
- type INetDialer
- type INetDialerFactory
- type IResolver
- type MXRecord
- type MailSender
- type MockIMailSender
- func (m *MockIMailSender) EXPECT() *MockIMailSenderMockRecorder
- func (m *MockIMailSender) LookupMX(ctx context.Context, domain dns.Domain) ([]string, error)
- func (m *MockIMailSender) NewConn(ctx context.Context, hosts []string) (net.Conn, error)
- func (m *MockIMailSender) SendMail(ctx context.Context, conn net.Conn, from, to smtp.Address, msg []byte) error
- type MockIMailSenderMockRecorder
- type MockINetDialer
- type MockINetDialerFactory
- type MockINetDialerFactoryMockRecorder
- type MockINetDialerMockRecorder
- type MockIResolver
- type MockIResolverMockRecorder
Constants ¶
const ( DEFAULT_SMTP_PORT_STR string = "25" TCP_NETWORK string = "tcp" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultNetDialerFactory ¶
type DefaultNetDialerFactory struct{}
func (*DefaultNetDialerFactory) NewDialer ¶
func (_ *DefaultNetDialerFactory) NewDialer() INetDialer
type IMailSender ¶
type INetDialerFactory ¶
type INetDialerFactory interface {
NewDialer() INetDialer
}
func NewDefaultDialerFactory ¶
func NewDefaultDialerFactory() INetDialerFactory
type MailSender ¶
type MailSender struct { CachedMX map[string]MXRecord DialerFactory INetDialerFactory Resolver IResolver Slogger *slog.Logger SmtpOpts smtpclient.Opts }
func NewMailSender ¶
func NewMailSender( ctx context.Context, dialerFactory INetDialerFactory, resolver IResolver, slogger *slog.Logger, ) *MailSender
type MockIMailSender ¶
type MockIMailSender struct {
// contains filtered or unexported fields
}
MockIMailSender is a mock of IMailSender interface.
func NewMockIMailSender ¶
func NewMockIMailSender(ctrl *gomock.Controller) *MockIMailSender
NewMockIMailSender creates a new mock instance.
func (*MockIMailSender) EXPECT ¶
func (m *MockIMailSender) EXPECT() *MockIMailSenderMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockIMailSenderMockRecorder ¶
type MockIMailSenderMockRecorder struct {
// contains filtered or unexported fields
}
MockIMailSenderMockRecorder is the mock recorder for MockIMailSender.
func (*MockIMailSenderMockRecorder) LookupMX ¶
func (mr *MockIMailSenderMockRecorder) LookupMX(ctx, domain any) *gomock.Call
LookupMX indicates an expected call of LookupMX.
type MockINetDialer ¶
type MockINetDialer struct {
// contains filtered or unexported fields
}
MockINetDialer is a mock of INetDialer interface.
func NewMockINetDialer ¶
func NewMockINetDialer(ctrl *gomock.Controller) *MockINetDialer
NewMockINetDialer creates a new mock instance.
func (*MockINetDialer) Dial ¶
func (m *MockINetDialer) Dial(network, address string) (net.Conn, error)
Dial mocks base method.
func (*MockINetDialer) EXPECT ¶
func (m *MockINetDialer) EXPECT() *MockINetDialerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockINetDialerFactory ¶
type MockINetDialerFactory struct {
// contains filtered or unexported fields
}
MockINetDialerFactory is a mock of INetDialerFactory interface.
func NewMockINetDialerFactory ¶
func NewMockINetDialerFactory(ctrl *gomock.Controller) *MockINetDialerFactory
NewMockINetDialerFactory creates a new mock instance.
func (*MockINetDialerFactory) EXPECT ¶
func (m *MockINetDialerFactory) EXPECT() *MockINetDialerFactoryMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockINetDialerFactory) NewDialer ¶
func (m *MockINetDialerFactory) NewDialer() INetDialer
NewDialer mocks base method.
type MockINetDialerFactoryMockRecorder ¶
type MockINetDialerFactoryMockRecorder struct {
// contains filtered or unexported fields
}
MockINetDialerFactoryMockRecorder is the mock recorder for MockINetDialerFactory.
func (*MockINetDialerFactoryMockRecorder) NewDialer ¶
func (mr *MockINetDialerFactoryMockRecorder) NewDialer() *gomock.Call
NewDialer indicates an expected call of NewDialer.
type MockINetDialerMockRecorder ¶
type MockINetDialerMockRecorder struct {
// contains filtered or unexported fields
}
MockINetDialerMockRecorder is the mock recorder for MockINetDialer.
type MockIResolver ¶
type MockIResolver struct {
// contains filtered or unexported fields
}
MockIResolver is a mock of IResolver interface.
func NewMockIResolver ¶
func NewMockIResolver(ctrl *gomock.Controller) *MockIResolver
NewMockIResolver creates a new mock instance.
func (*MockIResolver) EXPECT ¶
func (m *MockIResolver) EXPECT() *MockIResolverMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockIResolverMockRecorder ¶
type MockIResolverMockRecorder struct {
// contains filtered or unexported fields
}
MockIResolverMockRecorder is the mock recorder for MockIResolver.