email

package
v0.1.0-alpha Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountFormatError

type AccountFormatError struct{}

func (*AccountFormatError) Error

func (e *AccountFormatError) Error() string

func (*AccountFormatError) Message

func (*AccountFormatError) Status

func (e *AccountFormatError) Status() int

type AccountNotFoundError

type AccountNotFoundError struct{}

func (*AccountNotFoundError) Error

func (e *AccountNotFoundError) Error() string

func (*AccountNotFoundError) Message

func (*AccountNotFoundError) Status

func (e *AccountNotFoundError) Status() int

type CodeFormatError

type CodeFormatError struct{}

func (*CodeFormatError) Error

func (e *CodeFormatError) Error() string

func (*CodeFormatError) Message

func (e *CodeFormatError) Message() *proto.ResponseMessage

func (*CodeFormatError) Status

func (e *CodeFormatError) Status() int

type CodeIncorrectError

type CodeIncorrectError struct{}

func (*CodeIncorrectError) Error

func (e *CodeIncorrectError) Error() string

func (*CodeIncorrectError) Message

func (*CodeIncorrectError) Status

func (e *CodeIncorrectError) Status() int

type DialerOption

type DialerOption func(dialer *EmailDialer) error

func WithClient

func WithClient(host string, port int, from string, secret string) DialerOption

func WithSubject

func WithSubject(subject string) DialerOption

func WithToDom

func WithToDom(todom string) DialerOption

type DuplicateEmailError

type DuplicateEmailError struct{}

func (*DuplicateEmailError) Error

func (e *DuplicateEmailError) Error() string

func (*DuplicateEmailError) Message

func (*DuplicateEmailError) Status

func (e *DuplicateEmailError) Status() int

type EmailDialer

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

func NewEmailDialer

func NewEmailDialer(logger *zap.SugaredLogger, options ...DialerOption) (*EmailDialer, error)

type EmailDialingError

type EmailDialingError struct{}

func (*EmailDialingError) Error

func (e *EmailDialingError) Error() string

func (*EmailDialingError) Message

func (e *EmailDialingError) Message() *proto.ResponseMessage

func (*EmailDialingError) Status

func (e *EmailDialingError) Status() int

type EmailInternalError

type EmailInternalError struct{}

func (*EmailInternalError) Error

func (e *EmailInternalError) Error() string

func (*EmailInternalError) Message

func (*EmailInternalError) Status

func (e *EmailInternalError) Status() int

type EmailManager

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

func NewEmailManager

func NewEmailManager(logger *zap.SugaredLogger, options ...ManagerOption) (*EmailManager, error)

func (*EmailManager) Sign

func (m *EmailManager) Sign(account string) (int, proto.VerifyError)

func (*EmailManager) Verify

func (m *EmailManager) Verify(account string, guess string) (bool, proto.VerifyError)

type ManagerOption

type ManagerOption func(mgr *EmailManager) error

func WithAccExp

func WithAccExp(rule string) ManagerOption

func WithCache

func WithCache(cache cache.Cache) ManagerOption

func WithCodeExp

func WithCodeExp(rule string) ManagerOption

func WithEmailDialer

func WithEmailDialer(dialer *EmailDialer) ManagerOption

func WithEmailTemplate

func WithEmailTemplate(template string) ManagerOption

Jump to

Keyboard shortcuts

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