Documentation ¶
Index ¶
Constants ¶
View Source
const UserCollection = "c_user"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type User ¶
type User struct { ID int64 `bson:"id"` Username string `bson:"username"` Password string `bson:"password"` Email string `bson:"email"` Title string `bson:"title"` SourceType int64 `bson:"source_type"` CreateType int64 `bson:"create_type"` Status uint8 `bson:"status"` Ctime int64 `bson:"ctime"` Utime int64 `bson:"utime"` RoleCodes []string `bson:"role_codes"` }
type UserDAO ¶
type UserDAO interface { CreatUser(ctx context.Context, user User) (int64, error) FindByUsername(ctx context.Context, username string) (User, error) FindById(ctx context.Context, id int64) (User, error) ListUser(ctx context.Context, offset, limit int64) ([]User, error) AddOrUpdateRoleBind(ctx context.Context, id int64, roleCodes []string) (int64, error) Count(ctx context.Context) (int64, error) }
func NewUserDao ¶
Click to show internal directories.
Click to hide internal directories.