Documentation ¶
Overview ¶
Package eveimage provides cached access to images from the Eve Online image server.
Index ¶
- Constants
- Variables
- func AllianceLogoURL(id int32, size int) (string, error)
- func CharacterPortraitURL(id int32, size int) (string, error)
- func CorporationLogoURL(id int32, size int) (string, error)
- func FactionLogoURL(id int32, size int) (string, error)
- func InventoryTypeBPCURL(id int32, size int) (string, error)
- func InventoryTypeBPOURL(id int32, size int) (string, error)
- func InventoryTypeIconURL(id int32, size int) (string, error)
- func InventoryTypeRenderURL(id int32, size int) (string, error)
- type EveImageService
- func (m *EveImageService) AllianceLogo(id int32, size int) (fyne.Resource, error)
- func (m *EveImageService) CharacterPortrait(id int32, size int) (fyne.Resource, error)
- func (m *EveImageService) ClearCache() (int, error)
- func (m *EveImageService) CorporationLogo(id int32, size int) (fyne.Resource, error)
- func (m *EveImageService) Count() (int, error)
- func (m *EveImageService) FactionLogo(id int32, size int) (fyne.Resource, error)
- func (m *EveImageService) InventoryTypeBPC(id int32, size int) (fyne.Resource, error)
- func (m *EveImageService) InventoryTypeBPO(id int32, size int) (fyne.Resource, error)
- func (m *EveImageService) InventoryTypeIcon(id int32, size int) (fyne.Resource, error)
- func (m *EveImageService) InventoryTypeRender(id int32, size int) (fyne.Resource, error)
- func (m *EveImageService) InventoryTypeSKIN(id int32, size int) (fyne.Resource, error)
- func (m *EveImageService) Size() (int, error)
- 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 EveImageService ¶
type EveImageService struct {
// contains filtered or unexported fields
}
EveImageService provides cached access to images on the Eve Online image server.
func New ¶
func New(cacheDir string, httpClient *http.Client, isOffline bool) *EveImageService
New returns a new Images object. path is the location of the file cache. When no path is given (empty string) it will create a temporary directory instead. 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 ¶
func (m *EveImageService) AllianceLogo(id int32, size int) (fyne.Resource, error)
AllianceLogo returns the logo for an alliance.
func (*EveImageService) CharacterPortrait ¶
func (m *EveImageService) CharacterPortrait(id int32, size int) (fyne.Resource, error)
CharacterPortrait returns the portrait for a character.
func (*EveImageService) ClearCache ¶
func (m *EveImageService) ClearCache() (int, error)
ClearCache clears the images cache and returns the number of deleted entries.
func (*EveImageService) CorporationLogo ¶
func (m *EveImageService) CorporationLogo(id int32, size int) (fyne.Resource, error)
CorporationLogo returns the logo for a corporation.
func (*EveImageService) Count ¶
func (m *EveImageService) Count() (int, error)
Count returns the number of all image files.
func (*EveImageService) FactionLogo ¶
func (m *EveImageService) FactionLogo(id int32, size int) (fyne.Resource, error)
FactionLogo returns the logo for a faction.
func (*EveImageService) InventoryTypeBPC ¶
func (m *EveImageService) InventoryTypeBPC(id int32, size int) (fyne.Resource, error)
InventoryTypeBPC returns the icon for a BPC type.
func (*EveImageService) InventoryTypeBPO ¶
func (m *EveImageService) InventoryTypeBPO(id int32, size int) (fyne.Resource, error)
InventoryTypeBPO returns the icon for a BPO type.
func (*EveImageService) InventoryTypeIcon ¶
func (m *EveImageService) InventoryTypeIcon(id int32, size int) (fyne.Resource, error)
InventoryTypeIcon returns the icon for a type.
func (*EveImageService) InventoryTypeRender ¶
func (m *EveImageService) InventoryTypeRender(id int32, size int) (fyne.Resource, error)
InventoryTypeRender returns the render for a type. Note that not ever type has a render.
func (*EveImageService) InventoryTypeSKIN ¶
func (m *EveImageService) InventoryTypeSKIN(id int32, size int) (fyne.Resource, error)
InventoryTypeSKIN returns the icon for a SKIN type.
func (*EveImageService) Size ¶
func (m *EveImageService) Size() (int, error)
Size returns the total size of all image files in by bytes.