Documentation
¶
Index ¶
- Variables
- func CleanTypeName(s string) string
- func ParseAssets(input Input) (ParserResult, Input)
- func ParseCargoScan(input Input) (ParserResult, Input)
- func ParseCompare(input Input) (ParserResult, Input)
- func ParseContract(input Input) (ParserResult, Input)
- func ParseDScan(input Input) (ParserResult, Input)
- func ParseEFT(input Input) (ParserResult, Input)
- func ParseFitting(input Input) (ParserResult, Input)
- func ParseIndustry(input Input) (ParserResult, Input)
- func ParseKillmail(input Input) (ParserResult, Input)
- func ParseListing(input Input) (ParserResult, Input)
- func ParseLootHistory(input Input) (ParserResult, Input)
- func ParseMiningLedger(input Input) (ParserResult, Input)
- func ParseMoonLedger(input Input) (ParserResult, Input)
- func ParsePI(input Input) (ParserResult, Input)
- func ParseSurveyScan(input Input) (ParserResult, Input)
- func ParseViewContents(input Input) (ParserResult, Input)
- func ParseWallet(input Input) (ParserResult, Input)
- func ToFloat64(s string) float64
- func ToInt(s string) int64
- type AssetItem
- type AssetList
- type CargoScan
- type CargoScanItem
- type Compare
- type CompareItem
- type ContextListingParser
- type Contract
- type ContractItem
- type DScan
- type DScanItem
- type EFT
- type Fitting
- type HeuristicItem
- type HeuristicParser
- type HeuristicResult
- type Industry
- type IndustryItem
- type Input
- type Killmail
- type KillmailItem
- type Listing
- type ListingItem
- type LootHistory
- type LootItem
- type MiningLedger
- type MiningLedgerItem
- type MoonLedger
- type MoonLedgerItem
- type MultiParserResult
- type PI
- type PIItem
- type Parser
- type ParserResult
- type ScanItem
- type SurveyScan
- type ViewContents
- type ViewContentsItem
- type Wallet
- type WalletItemizedTransaction
- type WalletTransaction
Constants ¶
This section is empty.
Variables ¶
var AllParser = NewMultiParser(AllParsers)
AllParser is a multi-parser that uses all of the default parsers
var AllParsers = []Parser{ ParseKillmail, ParseEFT, ParseFitting, ParseLootHistory, ParsePI, ParseViewContents, ParseMoonLedger, ParseMiningLedger, ParseWallet, ParseSurveyScan, ParseIndustry, ParseContract, ParseAssets, ParseCargoScan, ParseDScan, ParseCompare, ParseListing, }
AllParsers is an array with all of the default parsers
Functions ¶
func CleanTypeName ¶
CleanTypeName will remove leading and trailing whitespace and leading asterisks.
func ParseAssets ¶
func ParseAssets(input Input) (ParserResult, Input)
ParseAssets will parse an asset listing
func ParseCargoScan ¶
func ParseCargoScan(input Input) (ParserResult, Input)
ParseCargoScan parses cargo scans
func ParseCompare ¶
func ParseCompare(input Input) (ParserResult, Input)
ParseCompare will parse an compare window
func ParseContract ¶
func ParseContract(input Input) (ParserResult, Input)
ParseContract parses a contract
func ParseFitting ¶
func ParseFitting(input Input) (ParserResult, Input)
ParseFitting parses fittings
func ParseIndustry ¶
func ParseIndustry(input Input) (ParserResult, Input)
ParseIndustry parses industry window text
func ParseKillmail ¶
func ParseKillmail(input Input) (ParserResult, Input)
ParseKillmail parses a killmail
func ParseListing ¶
func ParseListing(input Input) (ParserResult, Input)
ParseListing parses a list of eve items
func ParseLootHistory ¶
func ParseLootHistory(input Input) (ParserResult, Input)
ParseLootHistory parses loot history text
func ParseMiningLedger ¶
func ParseMiningLedger(input Input) (ParserResult, Input)
ParseMiningLedger will parse a mining ledger
func ParseMoonLedger ¶
func ParseMoonLedger(input Input) (ParserResult, Input)
ParseMoonLedger will parse a mining ledger
func ParsePI ¶
func ParsePI(input Input) (ParserResult, Input)
ParsePI parses text from the planetary interaction screens
func ParseSurveyScan ¶
func ParseSurveyScan(input Input) (ParserResult, Input)
ParseSurveyScan parses text from a the survey scan screen
func ParseViewContents ¶
func ParseViewContents(input Input) (ParserResult, Input)
ParseViewContents parses view contents text
func ParseWallet ¶
func ParseWallet(input Input) (ParserResult, Input)
ParseWallet parses wallet text
Types ¶
type AssetItem ¶
type AssetItem struct { Name string Quantity int64 Volume float64 Group string Category string Size string Slot string MetaLevel string TechLevel string PriceEstimate float64 }
AssetItem is a single item parsed from an asset list
type AssetList ¶
type AssetList struct { Items []AssetItem // contains filtered or unexported fields }
AssetList is the result from the asset parser
type CargoScan ¶
type CargoScan struct { Items []CargoScanItem // contains filtered or unexported fields }
CargoScan is the result from the cargo scan parser
type CargoScanItem ¶
CargoScanItem is a single item from a cargo scan result
type Compare ¶
type Compare struct { Items []CompareItem // contains filtered or unexported fields }
Compare is the result from the asset parser
type CompareItem ¶
type CompareItem struct {
Name string
}
CompareItem is a single item parsed from an asset list
type ContextListingParser ¶
type ContextListingParser struct {
// contains filtered or unexported fields
}
ContextListingParser is a parser which uses the typeDB to help parse a listing
func (*ContextListingParser) Parse ¶
func (p *ContextListingParser) Parse(input Input) (ParserResult, Input)
Parse parses a listing
type Contract ¶
type Contract struct { Items []ContractItem // contains filtered or unexported fields }
Contract is the result from the contract parser
type ContractItem ¶
type ContractItem struct { Name string Quantity int64 Type string Category string Details string Fitted bool BPC bool BPCRuns int64 }
ContractItem is a single item from a contract result
type DScan ¶
type DScan struct { Items []DScanItem // contains filtered or unexported fields }
DScan is the result from the cargo scan parser
type EFT ¶
type EFT struct { FittingName string Ship string Items []ListingItem // contains filtered or unexported fields }
EFT is the result from the EFT parser
type Fitting ¶
type Fitting struct { Items []ListingItem // contains filtered or unexported fields }
Fitting is the result from the fitting parser
type HeuristicItem ¶
HeuristicItem is a single item from a the heuristic result
type HeuristicParser ¶
type HeuristicParser struct {
// contains filtered or unexported fields
}
HeuristicParser is a parser that tries several strategies to parse out items and quantities from the given text. This is different from other parsers because it accesses the TypeDB
func (*HeuristicParser) Parse ¶
func (p *HeuristicParser) Parse(input Input) (ParserResult, Input)
Parse is the actual parse function for the HeuristicParser
type HeuristicResult ¶
type HeuristicResult struct { Items []HeuristicItem // contains filtered or unexported fields }
HeuristicResult is the result from the heuristic parser
func (*HeuristicResult) Lines ¶
func (r *HeuristicResult) Lines() []int
Lines returns the lines that this result is made from
type Industry ¶
type Industry struct { Items []IndustryItem // contains filtered or unexported fields }
Industry is the result from the industry parser
type IndustryItem ¶
IndustryItem is a single item from an industry result
type Input ¶
Input is used as the input to parsers. This exists so that the first part of parsing the text isn't duplicated for each parser
func StringToInput ¶
StringToInput converts a strings into an Input object
func StringsToInput ¶
StringsToInput converts an array of strings into an Input object
type Killmail ¶
type Killmail struct { Datetime string Victim map[string]interface{} Involved []map[string]interface{} Destroyed []KillmailItem Dropped []KillmailItem // contains filtered or unexported fields }
Killmail is the result from the killmail parser
type KillmailItem ¶
KillmailItem is a single item from a killmail result
type Listing ¶
type Listing struct { Items []ListingItem // contains filtered or unexported fields }
Listing is the result from the listing parser
type ListingItem ¶
ListingItem is a single item from a listing result
type LootHistory ¶
type LootHistory struct { Items []LootItem // contains filtered or unexported fields }
LootHistory is the result from the loot history parser
func (*LootHistory) Lines ¶
func (r *LootHistory) Lines() []int
Lines returns the lines that this result is made from
type MiningLedger ¶
type MiningLedger struct { Items []MiningLedgerItem // contains filtered or unexported fields }
MiningLedger is the result from the mining ledger parser
func (*MiningLedger) Lines ¶
func (r *MiningLedger) Lines() []int
Lines returns the lines that this result is made from
type MiningLedgerItem ¶
MiningLedgerItem is a single item from a mining ledger result
type MoonLedger ¶
type MoonLedger struct { Items []MoonLedgerItem // contains filtered or unexported fields }
MoonLedger is the result from the mining ledger parser
func (*MoonLedger) Lines ¶
func (r *MoonLedger) Lines() []int
Lines returns the lines that this result is made from
type MoonLedgerItem ¶
MoonLedgerItem is a single item from a mining ledger result
type MultiParserResult ¶
type MultiParserResult struct {
Results []ParserResult
}
MultiParserResult is the result from the multi-parser
func (*MultiParserResult) Lines ¶
func (r *MultiParserResult) Lines() []int
Lines returns the lines that this result is made from
func (*MultiParserResult) Name ¶
func (r *MultiParserResult) Name() string
Name returns the parser name
type PI ¶
type PI struct { Items []PIItem // contains filtered or unexported fields }
PI is the result from the planetary interaction parser
type Parser ¶
type Parser func(input Input) (ParserResult, Input)
Parser is the interface that every parser implements
func NewContextListingParser ¶
NewContextListingParser returns a new listing (w/context) parser
func NewHeuristicParser ¶
NewHeuristicParser returns a new HeuristicParser given a typeDB
func NewMultiParser ¶
NewMultiParser returns a new MultiParser that uses all of the given parses in order of preference
type ParserResult ¶
type ParserResult interface { // Name is the name of the PARSER that yielded this result Name() string Lines() []int }
ParserResult is the interface of the result that every parser returns
type SurveyScan ¶
type SurveyScan struct { Items []ScanItem // contains filtered or unexported fields }
SurveyScan is the result from the survey scan parser
func (*SurveyScan) Lines ¶
func (r *SurveyScan) Lines() []int
Lines returns the lines that this result is made from
type ViewContents ¶
type ViewContents struct { Items []ViewContentsItem // contains filtered or unexported fields }
ViewContents is the result from the view contents parser
func (*ViewContents) Lines ¶
func (r *ViewContents) Lines() []int
Lines returns the lines that this result is made from
type ViewContentsItem ¶
ViewContentsItem is a single item from a view contents result
type Wallet ¶
type Wallet struct { Transactions []WalletTransaction ItemizedTransactions []WalletItemizedTransaction // contains filtered or unexported fields }
Wallet is the result from the wallet parser