Documentation
¶
Index ¶
- Constants
- type CharacterID
- type GoldPricesUpload
- type MapDataUpload
- type MarketExpiryNotification
- type MarketHistoriesUpload
- type MarketHistory
- type MarketNotification
- type MarketNotificationType
- type MarketNotificationUpload
- type MarketOrder
- type MarketSellNotification
- type MarketUpload
- type PersonalizedUpload
- type PrivateUpload
- type Skill
- type SkillsUpload
- type Timescale
Constants ¶
View Source
const ( // Public Topics NatsGoldPricesIngest = "goldprices.ingest" NatsGoldPricesDeduped = "goldprices.deduped" NatsMarketOrdersIngest = "marketorders.ingest" NatsMarketOrdersDeduped = "marketorders.deduped" NatsMarketHistoriesIngest = "markethistories.ingest" NatsMarketHistoriesDeduped = "markethistories.deduped" NatsValidMarketOrders = "validmarketorders" NatsMapDataIngest = "mapdata.ingest" NatsMapDataDeduped = "mapdata.deduped" // Private Topics NatsSkillData = "skills" NatsMarketNotifications = "marketnotifications" )
View Source
const (
SalesTax = 0.03
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CharacterID ¶
type CharacterID string
Represents a character identifier in its UUID-style string format
type GoldPricesUpload ¶
type GoldPricesUpload struct {
Prices []int `json:"Prices"`
TimeStamps []int64 `json:"Timestamps"`
}
GoldPricesUpload contains the current gold prices
func (*GoldPricesUpload) StringArrays ¶
func (g *GoldPricesUpload) StringArrays() [][]string
type MapDataUpload ¶
type MapDataUpload struct {
ZoneID int `json:"ZoneID"`
BuildingType []int `json:"BuildingType"`
AvailableFood []int `json:"AvailableFood"`
Reward []int `json:"Reward"`
AvailableSilver []int `json:"AvailableSilver"`
Owners []string `json:"Owners"`
Buildable []bool `json:"Buildable"`
IsForSale []bool `json:"IsForSale"`
BuyPrice []int `json:"BuyPrice"`
}
MapDataUpload contains information on zone maps
func (*MapDataUpload) StringArrays ¶
func (m *MapDataUpload) StringArrays() [][]string
type MarketExpiryNotification ¶
type MarketExpiryNotification struct {
MailID int `json:"Id"`
ItemID string `json:"ItemTypeId"`
LocationID string `json:"LocationId"`
Amount int `json:"Amount"`
Expires string `json:"Expires"`
Price int `json:"UnitPriceSilver"`
Sold int `json:"Sold"`
}
func (*MarketExpiryNotification) Type ¶
func (m *MarketExpiryNotification) Type() MarketNotificationType
type MarketHistoriesUpload ¶
type MarketHistoriesUpload struct {
AlbionId uint32 `json:"AlbionId"`
LocationId int `json:"LocationId"`
QualityLevel uint8 `json:"QualityLevel"`
Timescale Timescale `json:"Timescale"`
Histories []*MarketHistory `json:"MarketHistories"`
}
type MarketHistory ¶
type MarketHistory struct {
ItemAmount int64 `json:"ItemAmount"`
SilverAmount uint64 `json:"SilverAmount"`
Timestamp uint64 `json:"Timestamp"`
}
MarketHistory contains the 3 data arrays (Item amount, silver amount, and timestamp) These values come over the wire with indexes aligned, but are likely not sorted by time. Their sizes also value based on need as mentioned below.
func (*MarketHistory) StringArray ¶
func (m *MarketHistory) StringArray() []string
StringArray for MarketHistory
type MarketNotification ¶
type MarketNotification interface {
Type() MarketNotificationType
}
type MarketNotificationType ¶
type MarketNotificationType string
const ( SalesNotification MarketNotificationType = "SalesNotification" ExpiryNotification = "ExpiryNotification" )
type MarketNotificationUpload ¶
type MarketNotificationUpload struct {
PrivateUpload
Type MarketNotificationType `json:"NotificationType"`
Notification MarketNotification `json:"Notification"`
}
type MarketOrder ¶
type MarketOrder struct {
ID int `json:"Id"`
ItemID string `json:"ItemTypeId"`
GroupTypeId string `json:"ItemGroupTypeId"`
LocationID int `json:"LocationId"`
QualityLevel int `json:"QualityLevel"`
EnchantmentLevel int `json:"EnchantmentLevel"`
Price int `json:"UnitPriceSilver"`
Amount int `json:"Amount"`
AuctionType string `json:"AuctionType"`
Expires string `json:"Expires"`
}
MarketOrder contains an order (offer or request)
func (*MarketOrder) StringArray ¶
func (m *MarketOrder) StringArray() []string
type MarketSellNotification ¶
type MarketSellNotification struct {
MailID int `json:"Id"`
ItemID string `json:"ItemTypeId"`
LocationID string `json:"LocationId"`
Amount int `json:"Amount"`
Expires string `json:"Expires"`
Price int `json:"UnitPriceSilver"`
TotalAfterTaxes float32 `json:"TotalAfterTaxes"`
}
func (*MarketSellNotification) Type ¶
func (m *MarketSellNotification) Type() MarketNotificationType
type MarketUpload ¶
type MarketUpload struct {
Orders []*MarketOrder `json:"Orders"`
}
MarketUpload contains a list of orders
type PersonalizedUpload ¶
type PersonalizedUpload interface {
Personalize(CharacterID, string)
}
type PrivateUpload ¶
type PrivateUpload struct {
CharacterId CharacterID `json:"CharacterId"`
CharacterName string `json:"CharacterName"`
}
func (*PrivateUpload) Personalize ¶
func (p *PrivateUpload) Personalize(id CharacterID, name string)
type Skill ¶
type Skill struct {
ID int `json:"Id"`
Level int `json:"Level"`
PercentNextLevel float64 `json:"PercentNextLevel"`
Fame int `json:"Fame"`
}
Skill contains a skill
type SkillsUpload ¶
type SkillsUpload struct {
PrivateUpload
Skills []*Skill `json:"Skills"`
}
SkillsUpload contains a list of skills
Click to show internal directories.
Click to hide internal directories.