Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Album ¶
type Album struct { ID string `json:"id"` Name string `json:"name" validate:"required"` Artist string `json:"artist" validate:"required"` Tracks []string `json:"tracks" validate:"min=1"` Year string `json:"year" validate:"numeric"` }
Album - stores the details for a album
type User ¶
type User struct { ID primitive.ObjectID `json:"id" bson:"_id,omitempty"` FirstName string `json:"firstname" validate:"alpha" bson:"firstname,omitempty"` LastName string `json:"lastname" validate:"alpha" bson:"lastname,omitempty"` NickName string `json:"nickname" validate:"alphanum" bson:"nickname,omitempty"` Email string `json:"email" validate:"required,email" bson:"email,omitempty"` Country string `json:"country" validate:"alpha" bson:"country,omitempty"` HashedPassword string `json:"hash"` }
User - stores the details for a album
func (*User) CompareSaltandHash ¶
CompareSaltandHash - implement HashedItem interface to compare password
type UserFormData ¶
func (*UserFormData) GetIDItem ¶
func (u *UserFormData) GetIDItem() database.IDItem
GetIDItem - get underlying user from the form data
func (*UserFormData) SaltandHash ¶
func (u *UserFormData) SaltandHash() error
SaltandHash - implement HashedItem interface to encrypt password
Click to show internal directories.
Click to hide internal directories.