Documentation ¶
Index ¶
- func FetchEveOnlineImage(u *url.URL) (i image.Image, expires time.Time, err error)
- func Random(n int) (string, error)
- func ValidateEveClaims(c *jwt.Claims) error
- type Alliance
- type AllianceIconURLs
- type Ancestry
- type Bloodline
- type Character
- type Client
- func (x *Client) Character(ctx context.Context, id int32) (*Character, error)
- func (x *Client) Characters(ctx context.Context, ids []int32) ([]*Character, error)
- func (x *Client) Corporation(ctx context.Context, id int32) (*Corporation, error)
- func (x *Client) GetAllianceIcon(ctx context.Context, id int32) (*AllianceIconURLs, error)
- func (x *Client) GetCorporationIcon(ctx context.Context, id int32) (*CorpIconURLs, error)
- func (x *Client) GetPortrait(ctx context.Context, id int32) (*PortraitURLs, error)
- func (x *Client) SearchCorp(ctx context.Context, q string, l language.Tag) ([]*Corporation, error)
- type CorpIconURLs
- type Corporation
- type Faction
- type JWTResponse
- type KeysMetadata
- type OAuth2Client
- type OAuthKeysMetadata
- type PortraitURLs
- type Race
- type Station
- type ThinClient
- type Tokens
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FetchEveOnlineImage ¶
FetchEveOnlineImage fetches an image from EvE Online.
It is able to decode JPEG, PNG, and GIF images.
The expires determines the ability to cache for our server. It is possible it is the zero Time, in which case we could not determine the cacheability.
func ValidateEveClaims ¶
Types ¶
type Alliance ¶
type Alliance struct { ID int32 `json:"id,omitempty"` Hydrated bool `json:"-"` // Only set if hydrated Name string `json:"name,omitempty"` Ticker string `json:"ticker,omitempty"` CreationCorp *Corporation `json:"creation_corporation,omitempty"` Creator *Character `json:"creator,omitempty"` Founded time.Time `json:"founded,omitempty"` Executor *Corporation `json:"executor_corproration,omitempty"` Faction *Faction `json:"faction,omitempty"` }
type Character ¶
type Character struct { ID int32 `json:"id,omitempty"` Hydrated bool `json:"-"` // Only set if hydrated Name string `json:"name,omitempty"` Title string `json:"title,omitempty"` Corporation *Corporation `json:"corporation,omitempty"` Alliance *Alliance `json:"alliance,omitempty"` Birthday time.Time `json:"birthday,omitempty"` Description string `json:"description,omitempty"` SecurityStatus float64 `json:"security_status,omitempty"` Faction *Faction `json:"faction,omitempty"` Gender string `json:"gender,omitempty"` Ancestry *Ancestry `json:"ancestry,omitempty"` Bloodline *Bloodline `json:"bloodline,omitempty"` Race *Race `json:"race,omitempty"` }
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func New ¶
func New(t *ThinClient) *Client
func (*Client) Character ¶
Character obtains information about the character.
Hydrates the Corporation, and any associated alliance.
func (*Client) Characters ¶
Characters is the same as Character but in parallel for multiple.
func (*Client) Corporation ¶
Corporation obtains information about the Corporation.
Hydrates the CEO, Creator, and any associated alliance.
func (*Client) GetAllianceIcon ¶
GetAllianceIcon returns the icon URLs for the specified Alliance.
Does not fetch the image payloads.
func (*Client) GetCorporationIcon ¶
GetCorporationIcon returns the icon URLs for the specified Corporation.
Does not fetch the image payloads.
func (*Client) GetPortrait ¶
GetPortrait returns the portrait URLs for the specified Character.
Does not fetch the image payloads.
func (*Client) SearchCorp ¶
SearchCorp returns a slice of Corporations matching the search query
Hydrates the Corporation, any associated alliance, the CEO, and Creator.
type CorpIconURLs ¶
type Corporation ¶
type Corporation struct { ID int32 `json:"id,omitempty"` Hydrated bool `json:"-"` // Only set if hydrated Name string `json:"name,omitempty"` Ticker string `json:"ticker,omitempty"` CEO *Character `json:"ceo,omitempty"` Creator *Character `json:"creator,omitempty"` Alliance *Alliance `json:"alliance,omitempty"` Founded time.Time `json:"founded,omitempty"` Description string `json:"description,omitempty"` Faction *Faction `json:"faction,omitempty"` Home *Station `json:"home_station,omitempty"` NMembers int32 `json:"number_members,omitempty"` TaxRate float64 `json:"tax_rate,omitempty"` URL *url.URL `json:"url,omitempty"` WarEligible bool `json:"war_eligible,omitempty"` }
type JWTResponse ¶
type KeysMetadata ¶
type KeysMetadata struct { Alg string `json:"alg"` Id string `json:"kid"` Kty string `json:"kty"` Use string `json:"use"` // RS N string `json:"n"` E string `json:"e"` // ES Crv string `json:"crv"` X string `json:"x"` Y string `json:"y"` }
func (*KeysMetadata) ValidateToken ¶
func (k *KeysMetadata) ValidateToken(b []byte) (*jwt.Claims, error)
type OAuth2Client ¶
func (*OAuth2Client) GetAuthorization ¶
func (o *OAuth2Client) GetAuthorization(code string) (*JWTResponse, error)
func (*OAuth2Client) GetRefresh ¶
func (o *OAuth2Client) GetRefresh(refresh string) (*JWTResponse, error)
type OAuthKeysMetadata ¶
type OAuthKeysMetadata struct {
Keys []*KeysMetadata `json:"keys"`
}
func FetchEveOnlineKeys ¶
func FetchEveOnlineKeys() (*OAuthKeysMetadata, error)
func (*OAuthKeysMetadata) JWTKey ¶
func (o *OAuthKeysMetadata) JWTKey() *KeysMetadata
func (*OAuthKeysMetadata) Scan ¶
func (o *OAuthKeysMetadata) Scan(src interface{}) error