Versions in this module Expand all Collapse all v0 v0.0.1 Sep 22, 2024 Changes in this version + const ErrInvalidPassword + type Account struct + Email string + ID int64 + Mobile string + Password string + Salt string + func NewAccount(options ...AccountOption) *Account + func NewAccountWithModel(model *models.Account) *Account + func (a *Account) CheckPassword(password string) error + func (a *Account) EncryptPassword() error + func (a *Account) GenerateId() + func (a *Account) IsPasswordValid(patterns ...string) bool + func (a *Account) ModifyPassword(password string) error + func (a *Account) ToModel() *models.Account + type AccountOption func(*Account) + func WithEmail(email string) AccountOption + func WithID(id int64) AccountOption + func WithMobile(mobile string) AccountOption + func WithPassword(password string) AccountOption