Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InfoPrivateUser ¶
type InfoPrivateUser struct { ID primitive.ObjectID `json:"_id" binding:"required" validate:"required"` Email string `json:"email" binding:"required" validate:"required,email"` Name string `json:"name" binding:"required" validate:"required"` ProfilePicURL *string `json:"profilePicUrl,omitempty" validate:"omitempty,url"` Roles []*InfoRole `json:"roles" validate:"required,dive,required"` }
func NewInfoPrivateUser ¶
func NewInfoPrivateUser(user *model.User) *InfoPrivateUser
func (*InfoPrivateUser) GetValue ¶
func (d *InfoPrivateUser) GetValue() *InfoPrivateUser
func (*InfoPrivateUser) ValidateErrors ¶
func (d *InfoPrivateUser) ValidateErrors(errs validator.ValidationErrors) ([]string, error)
type InfoPublicUser ¶
type InfoPublicUser struct { ID primitive.ObjectID `json:"_id" binding:"required" validate:"required"` Name string `json:"name" binding:"required" validate:"required"` ProfilePicURL *string `json:"profilePicUrl,omitempty" validate:"omitempty,url"` }
func NewInfoPublicUser ¶
func NewInfoPublicUser(user *model.User) *InfoPublicUser
func (*InfoPublicUser) GetValue ¶
func (d *InfoPublicUser) GetValue() *InfoPublicUser
func (*InfoPublicUser) ValidateErrors ¶
func (d *InfoPublicUser) ValidateErrors(errs validator.ValidationErrors) ([]string, error)
type InfoRole ¶
type InfoRole struct { ID primitive.ObjectID `json:"_id" binding:"required" validate:"required"` Code model.RoleCode `json:"code" binding:"required" validate:"required,rolecode"` }
func EmptyInfoRole ¶
func EmptyInfoRole() *InfoRole
func NewInfoRole ¶
func (*InfoRole) ValidateErrors ¶
Click to show internal directories.
Click to hide internal directories.