Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ImgUploadToken ¶
type LoginUserInfo ¶
type LoginUserInfo struct { ID primitive.ObjectID `json:"id" example:"xxxxxxxxxxxxx==" ` Name string `json:"name" example:"account name"` Email string `json:"email" example:"email@qq.com"` Roles []model.Erole `json:"roles" example:"ordinaryUser" ` }
todo implement error
func Account2SuccessLogin ¶
func Account2SuccessLogin(a model.Account) (s LoginUserInfo)
func (LoginUserInfo) IsInRole ¶
func (t LoginUserInfo) IsInRole(role string) bool
func (LoginUserInfo) IsUserInRole ¶
func (user LoginUserInfo) IsUserInRole(role model.Erole) bool
type RelateEntity2Entity ¶
type RelateEntity2Entity struct { RelatedID primitive.ObjectID `json:"related_id,omitempty"` RelateToID primitive.ObjectID `json:"relateTo_id,omitempty"` }
RelateEntity2Entity 将单实体关联到单实体dto
type RelateEntity2EntitySet ¶
type RelateEntity2EntitySet struct { RelatedID primitive.ObjectID `json:"related_id,omitempty"` RelateToIDs []primitive.ObjectID `json:"relateTo_ids,omitempty"` }
RelateEntity2EntitySet 关联单实体到多实体集dto
type RelateEntitySet2Entity ¶
type RelateEntitySet2Entity struct { RelatedIDs []primitive.ObjectID `json:"related_ids,omitempty"` RelateToID primitive.ObjectID `json:"relateTo_id,omitempty"` }
RelateEntitySet2Entity 关联实体集到单实体dto
type RelateEntitySet2EntitySet ¶
type RelateEntitySet2EntitySet struct { RelatedIDs []primitive.ObjectID `json:"related_ids,omitempty"` RelateToIDs []primitive.ObjectID `json:"relateTo_ids,omitempty"` }
RelateEntitySet2EntitySet 关联两个实体集dto
type UserInfo ¶
type UserInfo struct { ID primitive.ObjectID `json:"id" example:"xxxxxxxxxxxxx=="` Name string `json:"name" example:"account name"` Email string `json:"email" example:"email@qq.com"` Roles []model.Erole `json:"roles" example:"ordinaryUser" ` Settings map[string]string `` /* 127-byte string literal not displayed */ }
func Account2UserPublicInfo ¶
type UserInfoBrief ¶
type UserInfoBrief struct { ID primitive.ObjectID `json:"id" example:"xxxxxxxxxxxxx==" bson:"_id"` Name string `json:"name" example:"account name" bson:"username"` Email string `json:"email" example:"email@qq.com"` Settings map[string]string `` /* 127-byte string literal not displayed */ }
func MapAccount2InfoBrief ¶
func MapAccount2InfoBrief(a model.Account) (b UserInfoBrief)
Click to show internal directories.
Click to hide internal directories.