users

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 19, 2023 License: MIT Imports: 6 Imported by: 0

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL