Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrUserExist = errors.New("user exist") ErrNotFound = errors.New("not found") ErrAmountMustBigThanZero = errors.New("amount must big than zero") ErrCoinNotEnough = errors.New("coin not enough") ErrGemNotEnough = errors.New("gem not enough") ErrGiftNotEnough = errors.New("gift not enough") ErrBankNotEnough = errors.New("bank balance not enough") ErrPwdEmpty = errors.New("password can not be empty") ErrPwdNotSet = errors.New("password not set yet") ErrPwdWrong = errors.New("wrong password") ErrNickEmpty = errors.New("nick can not be empty") ErrSetValueExist = errors.New("can not use the same value") )
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct {
Id int64
Uid int64
Unionid string
Uuid string
Username string
Password string
Nick string
Gender bool
Addr string
Avatar string
Isguest bool
Condays int32
Signdate int64
Vipsigndate int64
Status bool
Mtime int64
Ctime int64
Bankpwd string
Forbid string
Imsi string
Imei string
Mac string
Did string
Psystem string
Pmodel string
Others map[string]int32
}
type AccountInfo ¶
type DBRepository ¶
type MQRepository ¶
type User ¶
type User struct {
Account
AccountInfo
sync.RWMutex
MQ MQRepository
}
type UserManager ¶
type UserManager struct {
// contains filtered or unexported fields
}
func NewUserManager ¶
func NewUserManager(dbRepository DBRepository, mqRepository MQRepository) *UserManager
func (*UserManager) AddUser ¶
func (um *UserManager) AddUser(uid int64, user *User, mq MQRepository) error
func (*UserManager) IsUserExist ¶
func (um *UserManager) IsUserExist(uid int64) bool
func (*UserManager) RemoveUser ¶
func (um *UserManager) RemoveUser(uid int64) error
Click to show internal directories.
Click to hide internal directories.