walle

package
v0.0.0-...-92c2bac Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2024 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Overview

Package wallet 货币系统

Index

Constants

View Source
const (
	// FontPath 通用字体路径
	FontPath = "data/font/"
	// FontFile 苹方字体
	FontFile = FontPath + "regular.ttf"
	// BoldFontFile 粗体苹方字体
	BoldFontFile = FontPath + "regular-bold.ttf"
	// SakuraFontFile 樱酥体
	SakuraFontFile = FontPath + "sakura.ttf"
	// ConsolasFontFile ...
	ConsolasFontFile = FontPath + "consolas.ttf"
	// SyumatuFontFile 少女终末旅行字体
	SyumatuFontFile = FontPath + "zhongmoti.ttf"
	// NisiFontFile 少女终末旅行字体变体
	NisiFontFile = FontPath + "Nisi-Regular.ttf"
	// VioletEvergardenFontFile 紫罗兰永恒花园字体 https://github.com/kagurazakayashi/EvergardenConverter
	VioletEvergardenFontFile = FontPath + "VioletEvergardenFont.ttf"
	// GlowSansFontFile 未来荧黑 https://github.com/welai/glow-sans
	GlowSansFontFile = FontPath + "GlowSansSC-Normal-ExtraBold.ttf"
	// ImpactFontFile ...
	ImpactFontFile = FontPath + "Impact.ttf"
	// HachiMaruPopRegularFontFile ...
	HachiMaruPopRegularFontFile = FontPath + "HachiMaruPop-Regular.ttf"
	// MaokenFontFile 猫啃珠圆体
	MaokenFontFile = FontPath + "MaokenZhuyuanTi.ttf"
)

Variables

This section is empty.

Functions

func GetWalletOf

func GetWalletOf(uid string) (money int)

GetWalletOf 获取钱包数据

func InsertWalletOf

func InsertWalletOf(uid string, money int) error

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

func StringToPic

func StringToPic(txt string, font string) (pic []byte, err error)

func StringToShake

func StringToShake(txt string, font string) (pic []byte, err error)

Types

type Storage

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

Storage 货币系统

type Wallet

type Wallet struct {
	UID   string
	Money int
}

Wallet 钱包

func GetGroupWalletOf

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

GetWalletInfoGroup 获取多人钱包数据

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

Jump to

Keyboard shortcuts

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