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 (e *AccountFormatError) Message() *proto.ResponseMessage
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 (e *AccountNotFoundError) Message() *proto.ResponseMessage
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 (e *CodeIncorrectError) Message() *proto.ResponseMessage
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 (e *DuplicateEmailError) Message() *proto.ResponseMessage
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 (e *EmailInternalError) Message() *proto.ResponseMessage
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
Click to show internal directories.
Click to hide internal directories.