shop

package
v0.0.0-...-872e689 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const MaxRetries = 5

Variables

This section is empty.

Functions

func GetMarketKey

func GetMarketKey() string

func GetUserInfoKey

func GetUserInfoKey(userId string) string

func GetUserInventoryKey

func GetUserInventoryKey(userId string) string

Types

type Shop

type Shop struct {
	Client *redis.Client
}

func NewShop

func NewShop() *Shop

func (*Shop) AddToShop

func (shop *Shop) AddToShop(userId string, itemId string, price float64) error

func (*Shop) GetUserFounds

func (shop *Shop) GetUserFounds(userId string) int

func (*Shop) NewUser

func (shop *Shop) NewUser(userId string, founds int, itemId ...string)

func (*Shop) PurchaseItem

func (shop *Shop) PurchaseItem(buyerId, itemId string) error

Jump to

Keyboard shortcuts

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