Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var NewUserSvcImpl = func(dbr *gorm.DB, dbw *gorm.DB, logger *zap.Logger) UserSvc { return &UserSvcImpl{ dbr: dbr, dbw: dbw, logger: logger, } }
NewUserSvcImpl 实例化服务
Functions ¶
This section is empty.
Types ¶
type UserSvc ¶
type UserSvc interface { //CreateUserAndWallet 创建用户及用户钱包 CreateUserAndWallet(nickname string, amount float64) error //CreateUserAndWalletWithUserID 创建用户及用户钱包(指定userID) CreateUserAndWalletWithUserID(userID int64, nickname string, amount float64) error //GetUserAndWallet 获取用户信息及余额 GetUserAndWallet(userID int64) (users.User, error) }
type UserSvcImpl ¶
type UserSvcImpl struct {
// contains filtered or unexported fields
}
func (UserSvcImpl) CreateUserAndWallet ¶
func (u UserSvcImpl) CreateUserAndWallet(nickname string, amount float64) error
func (UserSvcImpl) CreateUserAndWalletWithUserID ¶
func (u UserSvcImpl) CreateUserAndWalletWithUserID(userID int64, nickname string, amount float64) error
func (UserSvcImpl) GetUserAndWallet ¶
func (u UserSvcImpl) GetUserAndWallet(userID int64) (users.User, error)
Click to show internal directories.
Click to hide internal directories.