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.
Click to show internal directories.
Click to hide internal directories.