esi

package
v0.0.0-...-2fa03ef Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 10, 2021 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SpecialRegions = []struct {
	name     string
	stations []int64
	systems  []int64
	regionID int64
	private  bool
}{
	{
		// contains filtered or unexported fields
	},
	{
		// contains filtered or unexported fields
	},
	{
		// contains filtered or unexported fields
	}, {
		// contains filtered or unexported fields
	}, {
		// contains filtered or unexported fields
	}, {
		// contains filtered or unexported fields
	}, {
		// contains filtered or unexported fields
	},
}

SpecialRegions defines which regions we care about

Functions

This section is empty.

Types

type ContextKey

type ContextKey string

type HTTPHelp

type HTTPHelp struct {
	// contains filtered or unexported fields
}

func NewHTTPHelp

func NewHTTPHelp(ctx context.Context, redisClient *redis.Client, client *pester.Client) *HTTPHelp

func (*HTTPHelp) APIAuth

func (h *HTTPHelp) APIAuth() (string, error)

func (*HTTPHelp) FetchURL

func (h *HTTPHelp) FetchURL(needauth bool, url string, r interface{}) error

type MarketOrder

type MarketOrder struct {
	ID            int64   `json:"order_id"`
	Type          int64   `json:"type_id"`
	StationID     int64   `json:"location_id"`
	SystemID      int64   `json:"system_id"`
	Volume        int64   `json:"volume_remain"`
	MinVolume     int64   `json:"min_volume"`
	Price         float64 `json:"price"`
	Buy           bool    `json:"is_buy_order"`
	Duration      int64   `json:"duration"`
	Issued        string  `json:"issued"`
	VolumeEntered int64   `json:"volumeEntered"`
	Range         string  `json:"range"`
}

MarketOrder represents a market order in ESI

type PriceFetcher

type PriceFetcher struct {
	// contains filtered or unexported fields
}

PriceFetcher fetches prices and populates the given priceDB

func NewPriceFetcher

func NewPriceFetcher(ctx context.Context, priceDB evepraisal.PriceDB, baseURL string, redisClient *redis.Client, client *pester.Client) (*PriceFetcher, error)

NewPriceFetcher returns a new PriceFetcher

func (*PriceFetcher) Close

func (p *PriceFetcher) Close() error

Close should be called to stop the fetcher worker(s)

func (*PriceFetcher) FetchOrderData

func (p *PriceFetcher) FetchOrderData(client *pester.Client, baseURL string, regionIDs, structureIDs []int) (map[string]map[int64]evepraisal.Prices, error)

FetchOrderData concurrently fetches from each region that we care about

func (*PriceFetcher) FetchPriceData

func (p *PriceFetcher) FetchPriceData(client *pester.Client, baseURL string) (map[int64]evepraisal.Prices, error)

FetchPriceData fetches CCP's pricing information for every type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL