core

package
v0.0.0-...-1a421b7 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StockType          = "stock"
	CryptocurrencyType = "cryptocurrency"
	BuildingType       = "building"
	FactoryType        = "factory"
)

groups

Variables

View Source
var (
	//BasePrices prices
	BasePrices = map[string]float64{
		StockType:          10.0,
		CryptocurrencyType: 20.0,
		BuildingType:       30.0,
		FactoryType:        40.0,
	}
	//BaseRisks risks
	BaseRisks = map[string]float64{
		StockType:          1.0,
		CryptocurrencyType: 1.5,
		BuildingType:       2.0,
		FactoryType:        2.5,
	}
	//Types all types
	Types = []string{
		StockType,
		BuildingType,
		CryptocurrencyType,
		FactoryType,
	}
)

Functions

This section is empty.

Types

type Asset

type Asset struct {
	Id      string  `json:"id"`
	Name    string  `json:"name"`
	Comment string  `json:"comment"`
	ImgUrl  string  `json:"imgUrl"`
	Type    string  `json:"type"`
	Price   float64 `json:"price"`
	Risk    float64 `json:"risk"`
}

Asset asset data structure

func (*Asset) Key

func (asset *Asset) Key() []byte

Key get key bytes

func (*Asset) Value

func (asset *Asset) Value() []byte

Value get value bytes

type Auction

type Auction struct {
	Id        string    `json:"id"`
	StartTime time.Time `json:"startTime"`
	EndTime   time.Time `json:"endTime"`
	AssetId   string    `json:"assetId"`
	Bid       float64   `json:"bid"`
	Step      float64   `json:"step"`
	WinnerId  string    `json:"winnerId"`
}

Auction auction data structure

func (*Auction) Key

func (auc *Auction) Key() []byte

Key get key bytes

func (*Auction) Value

func (auc *Auction) Value() []byte

Value get value bytes

type Balance

type Balance struct {
	Id      string  `json:"id"`
	Account float64 `json:"account"`
}

Balance - сруктура для предоставлении информации об общем балансе игрока. Id - Id discord игрока. Account - личный счет игрока.

func (*Balance) Key

func (wallet *Balance) Key() []byte

Key - функция для получения ключа.

func (*Balance) Value

func (wallet *Balance) Value() []byte

Value get value bytes

type Bid

type Bid struct {
	UserId string    `json:"userId"`
	Bid    float64   `json:"bid"`
	Time   time.Time `json:"time"`
}

Bid struct

func (*Bid) Key

func (bid *Bid) Key() []byte

Key get key bytes

func (*Bid) Value

func (bid *Bid) Value() []byte

Value get value bytes

type Player

type Player struct {
	Id    string `json:"id"`
	Name  string `json:"name"`
	Email string `json:"email"`
}

Player - the structure of the player. I'd of the player in the discord.

func (*Player) Key

func (player *Player) Key() []byte

Key get key bytes

func (*Player) Value

func (player *Player) Value() []byte

Value get value bytes

type Portfolio

type Portfolio struct {
	Id string `json:"id"`
}

Portfolio user's investment portfolio

func (*Portfolio) Key

func (portfolio *Portfolio) Key() []byte

Key - функция для получения ключа.

func (*Portfolio) Value

func (portfolio *Portfolio) Value() []byte

Value get value bytes

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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