eveuniverse

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package eveuniverse contains the Eve universe service.

Index

Constants

This section is empty.

Variables

View Source
var ErrEveEntityNameMultipleMatches = errors.New("multiple matching EveEntity names")
View Source
var ErrEveEntityNameNoMatch = errors.New("no matching EveEntity name")
View Source
var ErrNotFound = errors.New("object not found")

Functions

This section is empty.

Types

type EveUniverseService

type EveUniverseService struct {
	StatusCacheService app.StatusCacheService
	// contains filtered or unexported fields
}

EveUniverseService provides access to Eve Online models with on-demand loading from ESI and local caching.

func New

func New(st *storage.Storage, esiClient *goesi.APIClient) *EveUniverseService

New returns a new instance of an Eve universe service.

func (*EveUniverseService) AddMissingEveEntities

func (eu *EveUniverseService) AddMissingEveEntities(ctx context.Context, ids []int32) ([]int32, error)

AddMissingEveEntities adds EveEntities from ESI for IDs missing in the database and returns which IDs where indeed missing.

func (*EveUniverseService) AddMissingEveTypes

func (eu *EveUniverseService) AddMissingEveTypes(ctx context.Context, ids []int32) error

func (*EveUniverseService) FormatValue

func (eu *EveUniverseService) FormatValue(ctx context.Context, value float32, unitID app.EveUnitID) (string, int32)

FormatValue returns a formatted value.

func (*EveUniverseService) GetEveDogmaAttribute

func (eu *EveUniverseService) GetEveDogmaAttribute(ctx context.Context, id int32) (*app.EveDogmaAttribute, error)

func (*EveUniverseService) GetEveLocation

func (eu *EveUniverseService) GetEveLocation(ctx context.Context, id int64) (*app.EveLocation, error)

func (*EveUniverseService) GetEveMarketPrice

func (eu *EveUniverseService) GetEveMarketPrice(ctx context.Context, typeID int32) (*app.EveMarketPrice, error)

func (*EveUniverseService) GetEveType

func (eu *EveUniverseService) GetEveType(ctx context.Context, id int32) (*app.EveType, error)

func (*EveUniverseService) GetOrCreateEveCategoryESI

func (eu *EveUniverseService) GetOrCreateEveCategoryESI(ctx context.Context, id int32) (*app.EveCategory, error)

func (*EveUniverseService) GetOrCreateEveCharacterESI

func (eu *EveUniverseService) GetOrCreateEveCharacterESI(ctx context.Context, id int32) (*app.EveCharacter, error)

func (*EveUniverseService) GetOrCreateEveConstellationESI

func (eu *EveUniverseService) GetOrCreateEveConstellationESI(ctx context.Context, id int32) (*app.EveConstellation, error)

func (*EveUniverseService) GetOrCreateEveDogmaAttributeESI

func (eu *EveUniverseService) GetOrCreateEveDogmaAttributeESI(ctx context.Context, id int32) (*app.EveDogmaAttribute, error)

func (*EveUniverseService) GetOrCreateEveEntityESI

func (eu *EveUniverseService) GetOrCreateEveEntityESI(ctx context.Context, id int32) (*app.EveEntity, error)

func (*EveUniverseService) GetOrCreateEveGroupESI

func (eu *EveUniverseService) GetOrCreateEveGroupESI(ctx context.Context, id int32) (*app.EveGroup, error)

func (*EveUniverseService) GetOrCreateEveLocationESI

func (eu *EveUniverseService) GetOrCreateEveLocationESI(ctx context.Context, id int64) (*app.EveLocation, error)

GetOrCreateEveLocationESI return a structure when it already exists or else tries to fetch and create a new structure from ESI.

Important: A token with the structure scope must be set in the context

func (*EveUniverseService) GetOrCreateEveMoonESI

func (eu *EveUniverseService) GetOrCreateEveMoonESI(ctx context.Context, id int32) (*app.EveMoon, error)

func (*EveUniverseService) GetOrCreateEvePlanetESI

func (eu *EveUniverseService) GetOrCreateEvePlanetESI(ctx context.Context, id int32) (*app.EvePlanet, error)

func (*EveUniverseService) GetOrCreateEveRaceESI

func (eu *EveUniverseService) GetOrCreateEveRaceESI(ctx context.Context, id int32) (*app.EveRace, error)

func (*EveUniverseService) GetOrCreateEveRegionESI

func (eu *EveUniverseService) GetOrCreateEveRegionESI(ctx context.Context, id int32) (*app.EveRegion, error)

func (*EveUniverseService) GetOrCreateEveSolarSystemESI

func (eu *EveUniverseService) GetOrCreateEveSolarSystemESI(ctx context.Context, id int32) (*app.EveSolarSystem, error)

func (*EveUniverseService) GetOrCreateEveTypeESI

func (eu *EveUniverseService) GetOrCreateEveTypeESI(ctx context.Context, id int32) (*app.EveType, error)

func (*EveUniverseService) ListEveEntitiesByPartialName

func (eu *EveUniverseService) ListEveEntitiesByPartialName(ctx context.Context, partial string) ([]*app.EveEntity, error)

func (*EveUniverseService) ListEveLocations

func (eu *EveUniverseService) ListEveLocations(ctx context.Context) ([]*app.EveLocation, error)

func (*EveUniverseService) ListEveTypeDogmaAttributesForType

func (eu *EveUniverseService) ListEveTypeDogmaAttributesForType(
	ctx context.Context,
	typeID int32,
) ([]*app.EveDogmaAttributeForType, error)

func (*EveUniverseService) ResolveUncleanEveEntities

func (eu *EveUniverseService) ResolveUncleanEveEntities(ctx context.Context, ee []*app.EveEntity) ([]*app.EveEntity, error)

Resolve slice of unclean EveEntity objects and return as new slice with resolved objects. Will return an error if some entities can not be resolved.

func (*EveUniverseService) ToEveEntities

func (eu *EveUniverseService) ToEveEntities(ctx context.Context, ids []int32) (map[int32]*app.EveEntity, error)

ToEveEntities returns the resolved EveEntities for a list of valid entity IDs. IDs with the value 0 are ignored. Will return an error an ID can not be resolved.

func (*EveUniverseService) UpdateAllEveCharactersESI

func (eu *EveUniverseService) UpdateAllEveCharactersESI(ctx context.Context) error

UpdateAllEveCharactersESI updates all known Eve characters from ESI.

func (*EveUniverseService) UpdateEveCategoryWithChildrenESI

func (eu *EveUniverseService) UpdateEveCategoryWithChildrenESI(ctx context.Context, categoryID int32) error

func (*EveUniverseService) UpdateEveShipSkills

func (eu *EveUniverseService) UpdateEveShipSkills(ctx context.Context) error

func (*EveUniverseService) UpdateSection

func (s *EveUniverseService) UpdateSection(ctx context.Context, section app.GeneralSection, forceUpdate bool) (bool, error)

Jump to

Keyboard shortcuts

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