Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewUserRegRepo ¶
func NewUserRegRepo(m mongodbClient) repository.UserReg
func NewUserRepo ¶
func NewUserRepo(m mongodbClient) repository.User
func NewWhiteListRepo ¶
func NewWhiteListRepo(m mongodbClient) repository.WhiteList
Types ¶
type DUser ¶
type DUser struct {
Id primitive.ObjectID `bson:"_id" json:"-"`
Name string `bson:"name" json:"name"`
Email string `bson:"email" json:"email"`
Bio string `bson:"bio" json:"bio"`
AvatarId string `bson:"avatar_id" json:"avatar_id"`
PlatformToken string `bson:"token" json:"token"`
PlatformTokenCreateAt int64 `bson:"token_create_time" json:"token_create_time"`
PlatformUserId string `bson:"uid" json:"uid"`
PlatformUserNamespaceId string `bson:"nid" json:"nid"`
CourseAgreement string `bson:"course_agreement" json:"course_agreement"`
FinetuneAgreement string `bson:"finetune_agreement" json:"finetune_agreement"`
UserAgreement string `bson:"user_agreement" json:"user_agreement"`
IsAgreePrivacy bool `bson:"is_agree_privacy" json:"is_agree_privacy"`
Follower []string `bson:"follower" json:"-"`
Following []string `bson:"following" json:"-"`
// Version will be increased by 1 automatically.
// So, don't marshal it to avoid setting it occasionally.
Version int `bson:"version" json:"-"`
}
type DUserRegInfo ¶
type DUserRegInfo struct {
Account string `bson:"account" json:"account"`
Name string `bson:"name" json:"name"`
City string `bson:"city" json:"city"`
Email string `bson:"email" json:"email"`
Phone string `bson:"phone" json:"phone"`
Identity string `bson:"identity" json:"identity"`
Province string `bson:"province" json:"province"`
Detail map[string]string `bson:"detail" json:"detail"`
Version int `bson:"version" json:"-"`
}
Click to show internal directories.
Click to hide internal directories.