Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNoSuchUser = errors.New("no such user")
)
errors
Functions ¶
This section is empty.
Types ¶
type User ¶
type User struct { ID uint `json:"id"` Username string `json:"username"` Email string `json:"email"` Password string `json:"-"` Firstname string `json:"firstname"` Lastname string `json:"lastname"` Gender Gender `json:"gender"` Address string `json:"address"` City string `json:"city"` State string `json:"state"` Zip string `json:"zip"` Country string `json:"country"` About string `json:"about"` Locale string `json:"locale"` // char(2) ShowNsfw bool `db:"show_nsfw" json:"show_nsfw"` UserURL string `db:"user_url" json:"user_url"` Admin bool `json:"admin"` AvatarURL string `db:"avatar_url" json:"avatar_url"` PublicKey sql.NullString `db:"public_key" json:"public_key"` PrivateKey sql.NullString `db:"private_key" json:"-"` AuthUUID sql.NullString `db:"authuuid" json:"-"` }
User represent an user
func GetByEmail ¶
GetByEmail returns user by his email
func GetByUsername ¶
GetByUsername return user by its ID
Click to show internal directories.
Click to hide internal directories.