Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DBResponse ¶
type DBResponse struct { ID primitive.ObjectID `json:"id" bson:"_id"` Name string `json:"name" bson:"name"` Email string `json:"email" bson:"email"` Password string `json:"password" bson:"password"` PasswordConfirm string `json:"passwordConfirm,omitempty" bson:"passwordConfirm,omitempty"` Role string `json:"role" bson:"role"` Verified bool `json:"verified" bson:"verified"` CreatedAt time.Time `json:"created_at" bson:"created_at"` UpdatedAt time.Time `json:"updated_at" bson:"updated_at"` }
type SignInInput ¶
type SignUpInput ¶
type SignUpInput struct { Name string `json:"name" bson:"name" binding:"required"` Email string `json:"email" bson:"email" binding:"required"` Password string `json:"password" bson:"password" binding:"required,min=8"` PasswordConfirm string `json:"passwordConfirm" bson:"passwordConfirm,omitempty" binding:"required"` Role string `json:"role" bson:"role"` Verified bool `json:"verified" bson:"verified"` CreatedAt time.Time `json:"created_at" bson:"created_at"` UpdatedAt time.Time `json:"updated_at" bson:"updated_at"` }
type UserResponse ¶
type UserResponse struct { ID primitive.ObjectID `json:"id,omitempty" bson:"_id,omitempty"` Name string `json:"name,omitempty" bson:"name,omitempty"` Email string `json:"email,omitempty" bson:"email,omitempty"` Role string `json:"role,omitempty" bson:"role,omitempty"` CreatedAt time.Time `json:"created_at" bson:"created_at"` UpdatedAt time.Time `json:"updated_at" bson:"updated_at"` }
func FilteredResponse ¶
func FilteredResponse(user *DBResponse) UserResponse
Click to show internal directories.
Click to hide internal directories.