Documentation
¶
Overview ¶
Package eveimageservice contains the EVE image service.
Index ¶
- Constants
- Variables
- func AllianceLogoURL(id int64, size int) (string, error)
- func CharacterPortraitURL(id int64, size int) (string, error)
- func CorporationLogoURL(id int64, size int) (string, error)
- func FactionLogoURL(id int64, size int) (string, error)
- func InventoryTypeBPCURL(id int64, size int) (string, error)
- func InventoryTypeBPOURL(id int64, size int) (string, error)
- func InventoryTypeIconURL(id int64, size int) (string, error)
- func InventoryTypeRenderURL(id int64, size int) (string, error)
- type CacheService
- type EveImageService
- func (s *EveImageService) AllianceLogo(id int64, size int) (fyne.Resource, error)
- func (s *EveImageService) AllianceLogoAsync(id int64, size int, setter func(r fyne.Resource))
- func (s *EveImageService) CharacterPortrait(id int64, size int) (fyne.Resource, error)
- func (s *EveImageService) CharacterPortraitAsync(id int64, size int, setter func(r fyne.Resource))
- func (s *EveImageService) CorporationLogo(id int64, size int) (fyne.Resource, error)
- func (s *EveImageService) CorporationLogoAsync(id int64, size int, setter func(r fyne.Resource))
- func (s *EveImageService) FactionLogo(id int64, size int) (fyne.Resource, error)
- func (s *EveImageService) FactionLogoAsync(id int64, size int, setter func(r fyne.Resource))
- func (s *EveImageService) InventoryTypeBPC(id int64, size int) (fyne.Resource, error)
- func (s *EveImageService) InventoryTypeBPCAsync(id int64, size int, setter func(r fyne.Resource))
- func (s *EveImageService) InventoryTypeBPO(id int64, size int) (fyne.Resource, error)
- func (s *EveImageService) InventoryTypeBPOAsync(id int64, size int, setter func(r fyne.Resource))
- func (s *EveImageService) InventoryTypeIcon(id int64, size int) (fyne.Resource, error)
- func (s *EveImageService) InventoryTypeIconAsync(id int64, size int, setter func(r fyne.Resource))
- func (s *EveImageService) InventoryTypeRender(id int64, size int) (fyne.Resource, error)
- func (s *EveImageService) InventoryTypeRenderAsync(id int64, size int, setter func(r fyne.Resource))
- func (s *EveImageService) InventoryTypeSKIN(id int64, size int) (fyne.Resource, error)
- func (s *EveImageService) InventoryTypeSKINAsync(id int64, size int, setter func(r fyne.Resource))
- type HTTPError
Constants ¶
const ( PlaceholderCharacterID = 1 PlaceholderCorporationID = 1 )
Variables ¶
Functions ¶
func AllianceLogoURL ¶
AllianceLogoURL returns an image URL for an alliance logo
func CharacterPortraitURL ¶
CharacterPortraitURL returns an image URL for a character portrait
func CorporationLogoURL ¶
CorporationLogoURL returns an image URL for a corporation logo
func FactionLogoURL ¶
FactionLogoURL returns an image URL for a faction logo
func InventoryTypeBPCURL ¶
InventoryTypeBPCURL returns an image URL for inventory type bpc
func InventoryTypeBPOURL ¶
InventoryTypeBPOURL returns an image URL for inventory type bpo
func InventoryTypeIconURL ¶
InventoryTypeIconURL returns an image URL for inventory type icon
Types ¶
type CacheService ¶
CacheService defines a cache service
type EveImageService ¶
type EveImageService struct {
// contains filtered or unexported fields
}
EveImageService represents a service which provides access to images on the Eve Online image server. Images are cached.
func New ¶
func New(cache CacheService, httpClient *http.Client, isOffline bool) *EveImageService
New returns a new EveImageService.
When no httpClient (nil) is provided it will use the default client. When isOffline is set to true, it will return a dummy image instead of trying to fetch images from the image server, which are not already cached.
func (*EveImageService) AllianceLogo ¶
AllianceLogo returns the logo for an alliance.
func (*EveImageService) AllianceLogoAsync ¶ added in v0.57.0
func (s *EveImageService) AllianceLogoAsync(id int64, size int, setter func(r fyne.Resource))
AllianceLogoAsync loads an alliance logo asynchronously and calls setter with the result.
func (*EveImageService) CharacterPortrait ¶
CharacterPortrait returns the portrait for a character.
func (*EveImageService) CharacterPortraitAsync ¶ added in v0.57.0
func (s *EveImageService) CharacterPortraitAsync(id int64, size int, setter func(r fyne.Resource))
CharacterPortraitAsync loads a character portrait asynchronously and calls setter with the result.
func (*EveImageService) CorporationLogo ¶
CorporationLogo returns the logo for a corporation.
func (*EveImageService) CorporationLogoAsync ¶ added in v0.57.0
func (s *EveImageService) CorporationLogoAsync(id int64, size int, setter func(r fyne.Resource))
CorporationLogoAsync loads a character portrait asynchronously and calls setter with the result.
func (*EveImageService) FactionLogo ¶
FactionLogo returns the logo for a faction.
func (*EveImageService) FactionLogoAsync ¶ added in v0.57.0
func (s *EveImageService) FactionLogoAsync(id int64, size int, setter func(r fyne.Resource))
FactionLogoAsync loads a faction logo asynchronously and calls setter with the result.
func (*EveImageService) InventoryTypeBPC ¶
InventoryTypeBPC returns the icon for a BPC type.
func (*EveImageService) InventoryTypeBPCAsync ¶ added in v0.57.0
func (s *EveImageService) InventoryTypeBPCAsync(id int64, size int, setter func(r fyne.Resource))
InventoryTypeBPCAsync loads the icon for a BPC type and calls setter with the result.
func (*EveImageService) InventoryTypeBPO ¶
InventoryTypeBPO returns the icon for a BPO type.
func (*EveImageService) InventoryTypeBPOAsync ¶ added in v0.57.0
func (s *EveImageService) InventoryTypeBPOAsync(id int64, size int, setter func(r fyne.Resource))
InventoryTypeBPOAsync loads the icon for a BPO type and calls setter with the result.
func (*EveImageService) InventoryTypeIcon ¶
InventoryTypeIcon returns the icon for a type.
func (*EveImageService) InventoryTypeIconAsync ¶ added in v0.57.0
func (s *EveImageService) InventoryTypeIconAsync(id int64, size int, setter func(r fyne.Resource))
InventoryTypeIconAsync loads a render for a type and calls setter with the result.
func (*EveImageService) InventoryTypeRender ¶
InventoryTypeRender returns the render for a type. Note that not ever type has a render.
func (*EveImageService) InventoryTypeRenderAsync ¶ added in v0.57.0
func (s *EveImageService) InventoryTypeRenderAsync(id int64, size int, setter func(r fyne.Resource))
InventoryTypeRenderAsync loads a render for a type and calls setter with the result.
func (*EveImageService) InventoryTypeSKIN ¶
InventoryTypeSKIN returns the icon for a SKIN type.
func (*EveImageService) InventoryTypeSKINAsync ¶ added in v0.57.0
func (s *EveImageService) InventoryTypeSKINAsync(id int64, size int, setter func(r fyne.Resource))
InventoryTypeSKINAsync loads the icon for a SKIN type and calls setter with the result.