wallet

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2023 License: Apache-2.0 Imports: 7 Imported by: 22

Documentation

Overview

Package wallet 货币系统

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetWalletOf

func GetWalletOf(uid int64) (money int)

GetWalletOf 获取钱包数据

func InsertWalletOf

func InsertWalletOf(uid int64, money int) error

InsertWalletOf 更新钱包(money > 0 增加,money < 0 减少)

Types

type Storage

type Storage struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Storage 货币系统

type Wallet

type Wallet struct {
	UID   int64
	Money int
}

Wallet 钱包

func GetGroupWalletOf

func GetGroupWalletOf(sortable bool, uids ...int64) (wallets []Wallet, err error)

GetGroupWalletOf 获取多人钱包数据

if sort == true,由高到低排序; if sort == false,由低到高排序

Jump to

Keyboard shortcuts

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