Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertRange ¶
ConvertRange converts a string range returned by the API into an int for use in UUDIF
Types ¶
type ColumnIndices ¶
type ColumnIndices struct {
// contains filtered or unexported fields
}
ColumnIndices keeps index values of the rowsets from UUDIF.
func GetColumnIndices ¶
func GetColumnIndices(message []byte) (ColumnIndices, error)
GetColumnIndices gets column indices for mapping keys correctly.
func (ColumnIndices) MarshalEasyJSON ¶
func (v ColumnIndices) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (ColumnIndices) MarshalJSON ¶
func (v ColumnIndices) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*ColumnIndices) UnmarshalEasyJSON ¶
func (v *ColumnIndices) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*ColumnIndices) UnmarshalJSON ¶
func (v *ColumnIndices) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type Order ¶
type Order struct {
OrderID int64 `json:"orderID"`
RegionID int64 `json:"regionID"`
TypeID int64 `json:"typeID"`
GeneratedAt string `json:"generatedAt"`
Price float64 `json:"price"`
VolRemaining int64 `json:"volRemaining"`
OrderRange int64 `json:"range"`
VolEntered int64 `json:"volEntered"`
MinVolume int64 `json:"minVolume"`
Bid bool `json:"bid"`
IssueDate string `json:"issueDate"`
Duration int64 `json:"duration"`
StationID int64 `json:"stationID"`
SolarSystemID int64 `json:"solarSystemID"`
}
Order stores information about a single order on the market including info from the rowset.
func ParseOrders ¶
func ParseOrders(rows []byte, indices ColumnIndices, regionID int64, typeID int64, generatedAt string) ([]Order, error)
ParseOrders parses orders from rows.
func (Order) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (Order) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*Order) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Order) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type RawRowset ¶
type RawRowset struct {
GeneratedAt string `json:"generatedAt"`
RegionID int64 `json:"regionID"`
TypeID int64 `json:"typeID"`
Rows []byte `json:"-"`
}
RawRowset contains unparsed orders for a given region/type combination at generatedAt (market snapshot). Can be used for deduplication of orders without parsing.
func ExtractRawRowsets ¶
ExtractRawRowsets extracts raw rowsets (orders are not being parsed).
func (RawRowset) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (RawRowset) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*RawRowset) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*RawRowset) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type Rowset ¶
type Rowset struct {
GeneratedAt string `json:"generatedAt"`
RegionID int64 `json:"regionID"`
TypeID int64 `json:"typeID"`
Rows []Order `json:"orders"`
}
Rowset contains all orders for a given region/type combination at generatedAt (market snapshot).
func ParseRawRowsets ¶
func ParseRawRowsets(rawRowsets []RawRowset, indices ColumnIndices) ([]Rowset, error)
ParseRawRowsets parses orders in raw rowset.
func ParseUUDIF ¶
ParseUUDIF message into structs. You probably want to use this function if all you want is to get all data.
func (Rowset) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (Rowset) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*Rowset) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Rowset) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface