Documentation ¶
Overview ¶
Package user ...
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type User ¶
type User struct { // ID is the user's unique identifier. (unique, crypto-secure random) ID snowflake.Snowflake `json:"id"` // Email is the user's email address. (unique, end-user data) Email string `json:"email,omitempty"` // Confirmed represents if the User has confirmed their email address. Confirmed bool `json:"confirmed"` // Locked represents if the User's account is locked. Locked bool `json:"-"` // Avatar is a hash of the User's avatar. Avatar string `json:"avatar"` // CreatedAt is a timestamp of when the account was created. CreatedAt time.Time `json:"created_at,omitempty"` // contains filtered or unexported fields }
User represents a Cosmos User.
func (*User) HasPassword ¶
HasPassword returns true if the user has a password.
func (*User) SetPassword ¶
SetPassword hashes a raw password and updates the user's password.
func (*User) VerifyPassword ¶
VerifyPassword takes a password and the user's hashed password and verifies the password against the hashed password.
Click to show internal directories.
Click to hide internal directories.