Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CardPrice ¶
type CardPrice struct { Price float32 Foil bool Currency CurrencyType Quantity int Platform PlatformType Trader string URL string }
func (*CardPrice) SellerFullName ¶ added in v0.0.7
type CardResult ¶
type CurrencyType ¶
type CurrencyType int
const ( RUR CurrencyType = iota USD CurrencyType = iota )
func (CurrencyType) MarshalJSON ¶
func (c CurrencyType) MarshalJSON() ([]byte, error)
func (CurrencyType) String ¶
func (c CurrencyType) String() string
type InMemoryLibrary ¶ added in v0.0.3
type InMemoryLibrary struct {
// contains filtered or unexported fields
}
func (*InMemoryLibrary) CardAliases ¶ added in v0.0.3
func (lib *InMemoryLibrary) CardAliases(cardname string) (map[string]bool, error)
func (*InMemoryLibrary) EnglishName ¶ added in v0.0.5
func (lib *InMemoryLibrary) EnglishName(cardname string) (string, error)
type Library ¶ added in v0.0.3
type Library interface { CardAliases(string) (map[string]bool, error) EnglishName(string) (string, error) }
func NewInMemoryLibrary ¶ added in v0.0.3
type NamesRequest ¶
type NamesRequest struct { Cards map[string]int DeliveryFee int // contains filtered or unexported fields }
func NewNamesRequest ¶
func NewNamesRequest() NamesRequest
type NamesResult ¶
type NamesResult struct { AllSortedCards map[string]CardResult MinPricesNoDelivery map[string][]CardPrice WithDeliveryByEliminateFewer map[string]CardPrice MinPricesMatrix *PossessionMatrix }
func ProcessByNames ¶
func ProcessByNames(req NamesRequest) (*NamesResult, error)
func ProcessText ¶
func ProcessText(r io.Reader) (*NamesResult, error)
type PlatformType ¶
type PlatformType int
const ( MtgSale PlatformType = iota MtgTrade PlatformType = iota SpellMarket PlatformType = iota AutumnsMagic PlatformType = iota TopDeck PlatformType = iota )
func (PlatformType) String ¶ added in v0.0.7
func (pt PlatformType) String() string
type PossessionMatrix ¶
type PossessionMatrix struct { SellerCards map[string]map[string]int CardSellers map[string]map[string]int }
func NewPossessionMatrix ¶
func NewPossessionMatrix() *PossessionMatrix
func (*PossessionMatrix) AddCard ¶
func (m *PossessionMatrix) AddCard(seller, card string, price int)
type PossessionTable ¶
type PossessionTable struct {
Sellers, Cards []string
Prices [][]int
SellerCardsTotal, SellerPriceTotal []int
CardSellersTotal []int
MinPrice, AvgPrice, MedianPrice []int
}
func NewPossessionTable ¶
func NewPossessionTable(m *PossessionMatrix) *PossessionTable
func (*PossessionTable) ToTextTable ¶
func (t *PossessionTable) ToTextTable(out io.Writer) error
func (*PossessionTable) ToXlsxSheet ¶
Click to show internal directories.
Click to hide internal directories.