onecurrency

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2023 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const DB_TABLE = "onecurrency_money"

DB_TABLE the table to use for onecurrency things

Variables

View Source
var Currency *currencyStore

Functions

This section is empty.

Types

type CurrencyObject

type CurrencyObject struct {
	Quantity     int    `bson:"q"`  // Quantity of currency
	BankQuantity int    `bson:"bQ"` // Quantity of currency in bank
	DisplayName  string `bson:"dN"` // DisplayName of the UUID who owns this CurrencyObject
}

CurrencyObject is an object containing an amount of currency.

type LocationObject added in v0.0.3

type LocationObject struct {
	Currency map[string]map[onelib.UUID]*CurrencyObject `bson:"c"` // key: [currencyType][user UUID]
}

LocationObject is an object representing a community, which stores all the currency values for all its users.

type UserCurrencyObject added in v0.0.3

type UserCurrencyObject struct {
	UUID onelib.UUID
	*CurrencyObject
}

UserCurrencyObject is a CurrencyObject that also has a `UUID` variable.

type UserObject added in v0.0.3

type UserObject struct {
	Currencies map[onelib.UUID][]string `bson:"c"` // map of location UUIDs to a list of currency types
}

UserObject represents an account, and can be aliased to another UserObject via UUID. It stores all its known currencies for reverse-lookups.

Jump to

Keyboard shortcuts

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