Documentation ¶
Index ¶
- Constants
- Variables
- type IUserUtils
- type User
- type UserInfo
- type UserUtils
- func (utils *UserUtils) AddUser(user *User) (primitive.ObjectID, error)
- func (utils *UserUtils) GetUserByAccount(account string) (User, error)
- func (utils *UserUtils) GetUserByAccountPwd(account string, password string) (User, error)
- func (utils *UserUtils) GetUserByID(id primitive.ObjectID) (User, error)
- func (utils *UserUtils) HasUser() (bool, error)
- func (utils *UserUtils) UpdateUser(user *User) error
- func (utils *UserUtils) UserHasScopeID(u_id primitive.ObjectID, s_id primitive.ObjectID) (bool, error)
Constants ¶
View Source
const ( NormalUser = 0 Administrator = 1 )
Variables ¶
View Source
var USER_COLLECTION string = "users"
View Source
var USER_MONGO_DB string = config.DB_NAME
Functions ¶
This section is empty.
Types ¶
type IUserUtils ¶
type IUserUtils interface { AddUser(user *User) (primitive.ObjectID, error) GetUserByID(id primitive.ObjectID) (User, error) GetUserByAccount(account string) (User, error) GetUserByAccountPwd(account string, password string) (User, error) HasUser() (bool, error) UserHasScopeID(u_id primitive.ObjectID, s_id primitive.ObjectID) (bool, error) UpdateUser(user *User) error }
type UserUtils ¶
func (*UserUtils) GetUserByAccount ¶
func (*UserUtils) GetUserByAccountPwd ¶
func (*UserUtils) GetUserByID ¶
func (*UserUtils) UpdateUser ¶
Click to show internal directories.
Click to hide internal directories.