Documentation
¶
Index ¶
Constants ¶
View Source
const UserAuthKeySize = 1 + 8 + sha512.Size
Variables ¶
View Source
var SecretSalt = "secret salt"
Functions ¶
This section is empty.
Types ¶
type User ¶
type User struct {
ID UserId `pg:",pk" json:"user_id"`
CreatedAt time.Time `pg:"default:now()" json:"-"`
UpdatedAt time.Time `pg:"default:now()" json:"-"`
DeletedAt *time.Time `pg:",soft_delete" json:"deleted_at,omitempty"`
Email string `pg:"type:varchar(500),unique,notnull" json:"email"`
Password UserPassword `json:"-"`
PasswordPlain string `json:"password_plain,omitempty" pg:"-"`
Name string `pg:"name" json:"name"`
// contains filtered or unexported fields
}
func AuthKeyToUserSearch ¶
func (User) AuthHash ¶
func (u User) AuthHash() UserPassword
func (User) GetAuthKey ¶
func (*User) SetPassword ¶
type UserAuthKey ¶
type UserAuthKey [UserAuthKeySize]byte
type UserPassword ¶
Click to show internal directories.
Click to hide internal directories.