Documentation ¶
Index ¶
Constants ¶
View Source
const (
ErrInvalidPassword = "密码由大小写字母、数字、符号组成,且至少需要8位"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
func NewAccount ¶
func NewAccount(options ...AccountOption) *Account
func NewAccountWithModel ¶
func (*Account) CheckPassword ¶
func (*Account) EncryptPassword ¶
func (*Account) GenerateId ¶
func (a *Account) GenerateId()
func (*Account) IsPasswordValid ¶
func (*Account) ModifyPassword ¶
type AccountOption ¶
type AccountOption func(*Account)
func WithEmail ¶
func WithEmail(email string) AccountOption
func WithID ¶
func WithID(id int64) AccountOption
func WithMobile ¶
func WithMobile(mobile string) AccountOption
func WithPassword ¶
func WithPassword(password string) AccountOption
Click to show internal directories.
Click to hide internal directories.