Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RegisterBody ¶
type RegisterBody struct { Account string `json:"account" bson:"account" binding:"required"` Password string `json:"password" bson:"-" binding:"required,gte=6"` Displayname string `json:"displayname" bson:"displayname" binding:"required"` CryptPass []byte `json:"-" bson:"cryptpass,omitempty"` CreatedAt *time.Time `json:"created_at,omitempty" bson:"created_at,omitempty"` }
RegisterBody ... 注册信息
func (*RegisterBody) GetAccount ¶
func (r *RegisterBody) GetAccount() string
GetAccount - implement domain.RegisterBody
func (*RegisterBody) GetPassword ¶
func (r *RegisterBody) GetPassword() string
GetPassword - implement domain.RegisterBody
func (*RegisterBody) SetCreatedTime ¶
func (r *RegisterBody) SetCreatedTime(t *time.Time)
SetCreatedTime - implement domain.RegisterBody
func (*RegisterBody) SetCryptPass ¶
func (r *RegisterBody) SetCryptPass() error
SetCryptPass - implement domain.RegisterBody
type UserBody ¶
type UserBody struct { ID converter.StrToObjectID `bson:"_id,omitempty" json:"id,omitempty"` // 用户ID // RegisterBody Account string `json:"account" bson:"account" binding:"required"` Displayname string `json:"displayname" bson:"displayname" binding:"required"` CryptPass []byte `json:"-" bson:"cryptpass,omitempty"` CreatedAt *time.Time `json:"created_at,omitempty" bson:"created_at,omitempty"` UpdatedAt *time.Time `bson:"updated_at,omitempty" json:"updated_at,omitempty"` // 更新时间 }
UserBody - Contain Register Body
func (*UserBody) GetCryptPass ¶
GetCryptPass - implement domain.User
func (*UserBody) GetDisplayName ¶
GetDisplayName - implement domain.User
func (*UserBody) SetUpdatedTime ¶
SetUpdatedTime - implement domain.User
Click to show internal directories.
Click to hide internal directories.