Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Login ¶
type Login struct { Username string `json:"username" validate:"required"` Password string `json:"Password" validate:"required"` }
Login request model
type Profile ¶
type Profile struct { ID string `json:"id"` UserID string `json:"-"` ProfilePicture string `json:"profilePicture"` }
Profile model object
type Response ¶
type Response struct { Status int `json:"status"` Message string `json:"message"` Content interface{} `json:"content"` }
Response is the http json response schema
func NewResponse ¶
NewResponse object
type Token ¶
type Token struct { Role []string `json:"role"` Username string `json:"username"` TokenString string `json:"accessToken"` }
Token responce
type User ¶
type User struct { ID primitive.ObjectID `json:"id" bson:"_id,omitempty"` Username string `json:"username" bson:"username,omitempty" validate:"required"` Password string `json:"password" bson:"password,omitempty" validate:"required,gte=8"` Email string `json:"email" bson:"email,omitempty" validate:"required"` Profile Profile `json:"profile" bson:"-"` }
User models object
func (*User) SetPassword ¶
SetPassword for update password value
Click to show internal directories.
Click to hide internal directories.