Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UpdateUser ¶
UpdateUser defines the set of data sent when updating a users data.
func (UpdateUser) Fields ¶
func (u UpdateUser) Fields() map[string]interface{}
Fields returns a map representing the data of the user.
func (UpdateUser) Table ¶
func (u UpdateUser) Table() string
Table returns the given table which the given struct corresponds to.
type UpdateUserPassword ¶
type UpdateUserPassword struct { PublicID string `json:"public_id"` Password string `json:"password"` PasswordConfirm string `json:"password_confirm"` }
UpdateUserPassword defines the set of data sent when updating a users password.
type User ¶
type User struct { Email string `json:"email"` PublicID string `json:"public_id"` PrivateID string `json:"private_id,omitempty"` Hash string `json:"hash,omitempty"` Profile *profile.Profile `json:"profile,omitempty"` }
User is a type defining the given user related fields for a given.
func (User) Authenticate ¶
Authenticate attempts to authenticate the giving password to the provided user.
func (*User) ChangePassword ¶
ChangePassword uses the provided password to set the users password hash.
func (User) SafeFields ¶
SafeFields returns a map representing the data of the user with important security fields removed.
func (*User) WithFields ¶
WithFields attempts to syncing the giving data within the provided map into it's own fields.