Documentation ¶ Index ¶ type Data func (u *Data) BeforeCreate() error func (u *Data) ComparePassword(password string) bool func (u *Data) IsAlive() bool func (u *Data) Sanitize() func (u *Data) Validate() error Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Data ¶ type Data struct { ID int `json:"id"` Img string `json:"img"` Password string `json:"password,omitempty"` // omitempty: if empty - don't return EncryptedPassword string `json:"-"` // no render Lifetime int64 `json:"lifetime"` } Data ... func (*Data) BeforeCreate ¶ func (u *Data) BeforeCreate() error BeforeCreate ... func (*Data) ComparePassword ¶ func (u *Data) ComparePassword(password string) bool ComparePassword ... func (*Data) IsAlive ¶ func (u *Data) IsAlive() bool IsAlive ... func (*Data) Sanitize ¶ func (u *Data) Sanitize() Sanitize ... func (*Data) Validate ¶ func (u *Data) Validate() error Validate ... Source Files ¶ View all Source files model.go Click to show internal directories. Click to hide internal directories.