Documentation ¶
Index ¶
- Variables
- func AucHasBonusRanks(aucData model.AucEntries) bool
- func FilterByLegendaryRank(items *model.AucData, itemID, rank int) (*model.AucData, error)
- func FormatGoldStr(copper uint64) string
- func FormatRoundedGoldStr(copper uint64) string
- func GetAveragePriceForItem(abLog *model.AucBotContext, aucData model.AucData, id int) (int, error)
- func GetPercentile12PriceForItem(abLog *model.AucBotContext, aucData model.AucData, id int) (int, error)
- func GoldStringToCopper(abLog *model.AucBotContext, goldString string) int
- func ItemHasBonusRanks(bonusList []int) bool
- type Accessor
- type AucCalc
- func (a *AucCalc) All() *AucCalc
- func (a *AucCalc) AveragePrice() *AucCalc
- func (a *AucCalc) Build(in model.AucEntries) *model.AucMathResults
- func (a *AucCalc) LowestBuyout() *AucCalc
- func (a *AucCalc) None() *AucCalc
- func (a *AucCalc) Percentile12() *AucCalc
- func (a *AucCalc) StdDev() *AucCalc
- func (a *AucCalc) TotalQuantity() *AucCalc
- type Data
- type RealmEntry
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func AucHasBonusRanks ¶
func AucHasBonusRanks(aucData model.AucEntries) bool
AucHasBonusRanks returns true if any item in the dataset includes a bonusID which indicates a bonus rank, or false otherwise
func FilterByLegendaryRank ¶
FilterByLegendaryRank filters auctions and returns a copy with only the items of a given "rank". Ranks are tied to specific bonusIDs present on the item as retrieved from the AH. Ranks correspond to item level increases or other modifiers. An error is returned if the given rank is invalid or the data is not for a single item.
func FormatGoldStr ¶
FormatGoldStr renders an amount of copper in a readable gold/silver/copper format
func FormatRoundedGoldStr ¶
FormatRoundedGoldStr renders an amount of copper in a readable format, rounded to the nearest gold.
func GetAveragePriceForItem ¶
GetAveragePriceForItem is a shortcut for AucCalc that retrieves the average copper price of an item
func GetPercentile12PriceForItem ¶
func GetPercentile12PriceForItem(abLog *model.AucBotContext, aucData model.AucData, id int) (int, error)
GetPercentile12PriceForItem is a shortcut for AucCalc that retrieves the average copper price of the 12th percentile of an item
func GoldStringToCopper ¶
func GoldStringToCopper(abLog *model.AucBotContext, goldString string) int
GoldStringToCopper is a utility function to convert a gold string back into the copper value used by Blizzard TODO in the future, the Results value could be a Gold struct {gold, silver, copper} instead of doing this
func ItemHasBonusRanks ¶
ItemHasBonusRanks returns true if the item includes a bonusID which indicates a bonus rank, or false otherwise
Types ¶
type Accessor ¶
type Accessor struct { BnetAccessor *bnet.Accessor DbAccessor *db.Accessor CacheAccessor cache.ICache RealmEntry *model.RealmCacheEntry // Last-Modified header value LastModified time.Time }
Accessor contains functions for interacting with the WoW Auction house API TODO linked realms have the same AH Data store a bank of accessors, instead of mapping by guild id
func (*Accessor) GetAuctionData ¶
type AucCalc ¶
type AucCalc struct {
// contains filtered or unexported fields
}
AucCalc is a builder that runs calculations on a set of auctions
func (*AucCalc) AveragePrice ¶
AveragePrice adds average price calculation to the builder
func (*AucCalc) Build ¶
func (a *AucCalc) Build(in model.AucEntries) *model.AucMathResults
Build runs the calculation and returns all desired results It combines all calculations into one loop to keep all if there are no auction entries, returns a blank struct
func (*AucCalc) LowestBuyout ¶
LowestBuyout adds lowest buyout calculation to the builder
func (*AucCalc) None ¶
None applies no calc functions (is basically a no-op for completeness/explicitness)
func (*AucCalc) Percentile12 ¶
Percentile12 adds the average price of the lowest 25% ie 12th percentile of items to the builder
func (*AucCalc) TotalQuantity ¶
TotalQuantity counts the total number of singular items on the AH
type RealmEntry ¶
RealmEntry contains realm information for auction Data.