esi

package
v0.0.0-...-d8ef1d0 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2021 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GetAlliance                    endpointID = "GetAlliance"
	GetCharacter                   endpointID = "GetCharacter"
	GetCharacterCorporationHistory endpointID = "GetCharacterCorporationHistory"
	GetCharacterAttributes         endpointID = "GetCharacterAttributes"
	GetCharacterAssets             endpointID = "GetCharacterAssets"
	GetCharacterSkills             endpointID = "GetCharacterSkills"
	GetCharacterSkillQueue         endpointID = "GetCharacterSkillQueue"
	GetCharacterClones             endpointID = "GetCharacterClones"
	GetCharacterImplants           endpointID = "GetCharacterImplants"
	GetCharacterContacts           endpointID = "GetCharacterContacts"
	GetCharacterContactLabels      endpointID = "GetCharacterContactLabels"
	GetCharacterContracts          endpointID = "GetCharacterContracts"
	GetCharacterContractItems      endpointID = "GetCharacterContractItems"
	GetCharacterContractBids       endpointID = "GetCharacterContractBids"
	GetCharacterFittings           endpointID = "GetCharacterFittings"
	GetCharacterLocation           endpointID = "GetCharacterLocation"
	GetCharacterMailHeaders        endpointID = "GetCharacterMailHeaders"
	GetCharacterMailHeader         endpointID = "GetCharacterMailHeader"
	GetCharacterMailLabels         endpointID = "GetCharacterMailLabels"
	GetCharacterMailLists          endpointID = "GetCharacterMailLists"
	GetCharacterOnline             endpointID = "GetCharacterOnline"
	GetCharacterShip               endpointID = "GetCharacterShip"
	GetCharacterWalletBalance      endpointID = "GetCharacterWalletBalance"
	GetCharacterWalletTransactions endpointID = "GetCharacterWalletTransactions"
	GetCharacterWalletJournal      endpointID = "GetCharacterWalletJournal"
	GetCorporation                 endpointID = "GetCorporation"
	GetCorporationAllianceHistory  endpointID = "GetCorporationAllianceHistory"
	GetAncestries                  endpointID = "GetAncestries"
	GetAsteroidBelt                endpointID = "GetAsteroidBelt"
	GetBloodlines                  endpointID = "GetBloodlines"
	GetCategories                  endpointID = "GetCategories"
	GetCategory                    endpointID = "GetCategory"
	GetConstellation               endpointID = "GetConstellation"
	GetFactions                    endpointID = "GetFactions"
	GetGroup                       endpointID = "GetGroup"
	GetMoon                        endpointID = "GetMoon"
	GetPlanet                      endpointID = "GetPlanet"
	GetRaces                       endpointID = "GetRaces"
	GetRegions                     endpointID = "GetRegions"
	GetRegion                      endpointID = "GetRegion"
	GetSolarSystem                 endpointID = "GetSolarSystem"
	GetStation                     endpointID = "GetStation"
	GetStructure                   endpointID = "GetStructure"
	GetType                        endpointID = "GetType"
	PostUniverseNames              endpointID = "PostUniverseNames"
)
View Source
const (
	// ESI Timestamp Format
	ESI_EXPIRES_HEADER_FORMAT = "Mon, 02 Jan 2006 15:04:05 MST"
)

Variables

This section is empty.

Functions

func ModWithAllianceID

func ModWithAllianceID(allianceID uint) modifierFunc

func ModWithCategoryID

func ModWithCategoryID(categoryID uint) modifierFunc

func ModWithCharacterID

func ModWithCharacterID(characterID uint) modifierFunc

func ModWithConstellationID

func ModWithConstellationID(constellationID uint) modifierFunc

func ModWithContractID

func ModWithContractID(contractID uint) modifierFunc

func ModWithCorporationID

func ModWithCorporationID(corporationID uint) modifierFunc

func ModWithFromID

func ModWithFromID(from uint64) modifierFunc

func ModWithGroupID

func ModWithGroupID(groupID uint) modifierFunc

func ModWithItemID

func ModWithItemID(itemID uint) modifierFunc

func ModWithLastMailID

func ModWithLastMailID(lastMailID uint64) modifierFunc

func ModWithMailID

func ModWithMailID(mailID uint) modifierFunc

func ModWithPage

func ModWithPage(page uint) modifierFunc

func ModWithRegionID

func ModWithRegionID(regionID uint) modifierFunc

func ModWithStationID

func ModWithStationID(stationID uint) modifierFunc

func ModWithStructureID

func ModWithStructureID(structureID uint64) modifierFunc

func ModWithSystemID

func ModWithSystemID(solarSystemID uint) modifierFunc

func RetrieveErrorCount

func RetrieveErrorCount(h http.Header) uint64

RetrieveErrorCount is a helper method that retrieves the number of errors that this application has triggered and how many more can be triggered before potentially encountereding an HTTP Status 420

func RetrieveErrorReset

func RetrieveErrorReset(h http.Header) uint64

RetrieveErrorReset is a helper method that retrieves the number of seconds until our Error Limit resets

func RetrieveEtagHeader

func RetrieveEtagHeader(h http.Header) string

RetrieveEtagHeader is a helper method that retrieves an Etag for the most recent request to ESI

func RetrieveExpiresHeader

func RetrieveExpiresHeader(h http.Header, duration time.Duration) time.Time

retrieveExpiresHeader takes a map[string]string of the response headers, checks to see if the "Expires" key exists, and if it does, parses the timestamp and returns a time.Time. If duraction is greater than zero(0), then that number of minutes will be add to the expires time that is parsed from the header.

func RetrieveXPagesFromHeader

func RetrieveXPagesFromHeader(h http.Header) uint

Types

type Category

type Category string
const (
	CategoryAlliance      Category = "alliance"
	CategoryCharacter     Category = "character"
	CategoryCorporation   Category = "corporation"
	CategoryConstellation Category = "constellation"
	CategoryInventoryType Category = "inventory_type"
	CategoryRegion        Category = "region"
	CategorySolarSystem   Category = "solar_system"
	CategoryStation       Category = "station"
	CategoryFaction       Category = "faction"
)

type GenericError

type GenericError struct {
	Message string `json:"message"`
}

func (GenericError) Error

func (e GenericError) Error() string

type MailHeader

type MailHeader struct {
	Body null.String `json:"body"`

	From       null.Uint `json:"from,omitempty"`
	IsRead     bool      `json:"is_read"`
	Labels     []uint64  `json:"labels"`
	MailID     null.Uint `json:"mail_id"`
	Recipients []struct {
		RecipientID   uint                 `json:"recipient_id"`
		RecipientType athena.RecipientType `json:"recipient_type"`
	} `json:"recipients"`
	Subject   null.String `json:"subject"`
	Timestamp time.Time   `json:"timestamp"`
}

type OptionFunc

type OptionFunc func(*options) *options

func WithAuthorization

func WithAuthorization(token string) OptionFunc

func WithBody

func WithBody(d []byte) OptionFunc

func WithEtag

func WithEtag(etag string) OptionFunc

func WithHeader

func WithHeader(key, value string) OptionFunc

func WithMethod

func WithMethod(method string) OptionFunc

func WithPage

func WithPage(i uint) OptionFunc

func WithPath

func WithPath(path string) OptionFunc

func WithQuery

func WithQuery(key, value string) OptionFunc

type PostUniverseNamesOK

type PostUniverseNamesOK struct {
	Category Category `json:"category"`
	ID       uint     `json:"id"`
	Name     string   `json:"name"`
}

type Service

type Service interface {
	// contains filtered or unexported methods
}

func NewService

func NewService(client *http.Client, cache cache.Service, etag etag.Service, uagent string) Service

NewService returns a default implementation of this service

Jump to

Keyboard shortcuts

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