Documentation ¶
Overview ¶
Package eveuniverse contains the Eve universe service.
Index ¶
- Variables
- type EveUniverseService
- func (eu *EveUniverseService) AddMissingEveEntities(ctx context.Context, ids []int32) ([]int32, error)
- func (eu *EveUniverseService) AddMissingEveTypes(ctx context.Context, ids []int32) error
- func (eu *EveUniverseService) FormatValue(ctx context.Context, value float32, unitID app.EveUnitID) (string, int32)
- func (eu *EveUniverseService) GetEveDogmaAttribute(ctx context.Context, id int32) (*app.EveDogmaAttribute, error)
- func (eu *EveUniverseService) GetEveLocation(ctx context.Context, id int64) (*app.EveLocation, error)
- func (eu *EveUniverseService) GetEveMarketPrice(ctx context.Context, typeID int32) (*app.EveMarketPrice, error)
- func (eu *EveUniverseService) GetEveType(ctx context.Context, id int32) (*app.EveType, error)
- func (eu *EveUniverseService) GetOrCreateEveCategoryESI(ctx context.Context, id int32) (*app.EveCategory, error)
- func (eu *EveUniverseService) GetOrCreateEveCharacterESI(ctx context.Context, id int32) (*app.EveCharacter, error)
- func (eu *EveUniverseService) GetOrCreateEveConstellationESI(ctx context.Context, id int32) (*app.EveConstellation, error)
- func (eu *EveUniverseService) GetOrCreateEveDogmaAttributeESI(ctx context.Context, id int32) (*app.EveDogmaAttribute, error)
- func (eu *EveUniverseService) GetOrCreateEveEntityESI(ctx context.Context, id int32) (*app.EveEntity, error)
- func (eu *EveUniverseService) GetOrCreateEveGroupESI(ctx context.Context, id int32) (*app.EveGroup, error)
- func (eu *EveUniverseService) GetOrCreateEveLocationESI(ctx context.Context, id int64) (*app.EveLocation, error)
- func (eu *EveUniverseService) GetOrCreateEveMoonESI(ctx context.Context, id int32) (*app.EveMoon, error)
- func (eu *EveUniverseService) GetOrCreateEvePlanetESI(ctx context.Context, id int32) (*app.EvePlanet, error)
- func (eu *EveUniverseService) GetOrCreateEveRaceESI(ctx context.Context, id int32) (*app.EveRace, error)
- func (eu *EveUniverseService) GetOrCreateEveRegionESI(ctx context.Context, id int32) (*app.EveRegion, error)
- func (eu *EveUniverseService) GetOrCreateEveSchematicESI(ctx context.Context, id int32) (*app.EveSchematic, error)
- func (eu *EveUniverseService) GetOrCreateEveSolarSystemESI(ctx context.Context, id int32) (*app.EveSolarSystem, error)
- func (eu *EveUniverseService) GetOrCreateEveTypeESI(ctx context.Context, id int32) (*app.EveType, error)
- func (eu *EveUniverseService) ListEveEntitiesByPartialName(ctx context.Context, partial string) ([]*app.EveEntity, error)
- func (eu *EveUniverseService) ListEveLocations(ctx context.Context) ([]*app.EveLocation, error)
- func (eu *EveUniverseService) ListEveTypeDogmaAttributesForType(ctx context.Context, typeID int32) ([]*app.EveTypeDogmaAttribute, error)
- func (eu *EveUniverseService) ResolveUncleanEveEntities(ctx context.Context, ee []*app.EveEntity) ([]*app.EveEntity, error)
- func (eu *EveUniverseService) ToEveEntities(ctx context.Context, ids []int32) (map[int32]*app.EveEntity, error)
- func (eu *EveUniverseService) UpdateAllEveCharactersESI(ctx context.Context) error
- func (eu *EveUniverseService) UpdateEveCategoryWithChildrenESI(ctx context.Context, categoryID int32) error
- func (eu *EveUniverseService) UpdateEveShipSkills(ctx context.Context) error
- func (s *EveUniverseService) UpdateSection(ctx context.Context, section app.GeneralSection, forceUpdate bool) (bool, error)
Constants ¶
This section is empty.
Variables ¶
var ErrEveEntityNameMultipleMatches = errors.New("multiple matching EveEntity names")
var ErrEveEntityNameNoMatch = errors.New("no matching EveEntity name")
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 (*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 (*EveUniverseService) GetOrCreateEveGroupESI ¶
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 (*EveUniverseService) GetOrCreateEvePlanetESI ¶
func (*EveUniverseService) GetOrCreateEveRaceESI ¶
func (*EveUniverseService) GetOrCreateEveRegionESI ¶
func (*EveUniverseService) GetOrCreateEveSchematicESI ¶ added in v0.8.0
func (eu *EveUniverseService) GetOrCreateEveSchematicESI(ctx context.Context, id int32) (*app.EveSchematic, error)
func (*EveUniverseService) GetOrCreateEveSolarSystemESI ¶
func (eu *EveUniverseService) GetOrCreateEveSolarSystemESI(ctx context.Context, id int32) (*app.EveSolarSystem, error)
func (*EveUniverseService) GetOrCreateEveTypeESI ¶
func (*EveUniverseService) ListEveEntitiesByPartialName ¶
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.EveTypeDogmaAttribute, 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. ID 0 will be resolved to a zero value EveEntity object Will return an error if any 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)