Documentation ¶
Index ¶
Constants ¶
View Source
const ( // UniqueIndex defines the unique index name used by the models db for model query optimization. UniqueIndex = "user_id" // UniqueIndexField defines the unique index field used by the model in it's field. UniqueIndexField = "user_public_id" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NewProfile ¶
type NewProfile struct { Address string `json:"address"` UserID string `json:"user_id"` FirstName string `json:"first_name"` LastName string `json:"last_name"` }
NewProfile defines a struct which contains data for creating a new user profile.
type Profile ¶
type Profile struct { Address string `json:"address"` UserID string `json:"user_id"` PublicID string `json:"public_id"` FirstName string `json:"first_name"` LastName string `json:"last_name"` }
Profile defines a struct which holds the the details of a giving user's profile.
func (*Profile) WithFields ¶
WithFields attempts to syncing the giving data within the provided map into it's own fields.
type UpdateProfile ¶
type UpdateProfile struct { Address string `json:"address"` PublicID string `json:"public_id"` FirstName string `json:"first_name"` LastName string `json:"last_name"` }
UpdateProfile defines a struct which contains data for updating user profile.
func (UpdateProfile) Fields ¶
func (u UpdateProfile) Fields() map[string]interface{}
Fields returns a map representing the data of the session.
func (UpdateProfile) Table ¶
func (UpdateProfile) Table() string
Table returns the given table which the given struct corresponds to.
Click to show internal directories.
Click to hide internal directories.