Documentation ¶
Index ¶
- Variables
- type Account
- func (account *Account) Delete() error
- func (account *Account) DeletePassword() error
- func (account *Account) MatchPassword(password string) error
- func (account *Account) SetPassword(password string) error
- func (account *Account) UpdatePassword(newPassword string) error
- func (a *Account) ValidateFields() error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidName = errors.New("invalid name") ErrInvalidPassword = errors.New("invalid password") ErrInvalidEmail = errors.New("invalid email address") GravatarURI = "https://gravatar.com/avatar/%s?s=%v" RegexpEmail = regexp.MustCompile(`^[^@]+@[^@.]+\.[^@.]+`) )
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct { ID *int64 `json:"-" db:"id"` UID *string `json:"uid" db:"uid"` Email *string `json:"email" db:"email"` Name *string `json:"name, omitempty" db:"name"` Password *string `json:"password, omitempty" db:"password"` Active *bool `json:"active" db:"active"` Gravatar *string `json:"gravatar" db:"gravatar"` Created *time.Time `json:"created" db:"created"` Updated *time.Time `json:"updated" db:"updated"` Deleted *bool `json:"deleted, omitempty" db:"deleted"` }
func NewAccount ¶
func (*Account) DeletePassword ¶
func (*Account) MatchPassword ¶
func (*Account) SetPassword ¶
func (*Account) UpdatePassword ¶
func (*Account) ValidateFields ¶
Click to show internal directories.
Click to hide internal directories.