universe

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AncestryByID

func AncestryByID(ctx context.Context, id *int) (*model.Ancestry, error)

AncestryByID takes a context for tracing and an ID to query the Ancestry by.

func AsteroidBeltByID

func AsteroidBeltByID(ctx context.Context, id *int) (*model.AsteroidBelt, error)

AsteroidBeltByID takes a context for tracing and an ID to query the Astroid Belt by.

func AsteroidBeltDetails

func AsteroidBeltDetails(ctx context.Context, asteroidBelts []*int) ([]*model.AsteroidBelt, error)

AsteroidBeltDetails takes in a context for tracing and an array of astroidBelt IDs to query buy to return the data requested.

func BloodlineByID

func BloodlineByID(ctx context.Context, id *int) (*model.Bloodline, error)

BloodlineByID takes a context for tracing and an ID to query the Bloodline by.

func CategoryByID

func CategoryByID(ctx context.Context, id *int) (*model.Category, error)

CategoryByID takes a context for tracing and an ID to query the Category by.

func ConstellationByID

func ConstellationByID(ctx context.Context, id *int) (*model.Constellation, error)

ConstellationByID takes a context for tracing and an ID to query the Constellation by.

func ConstellationsByIDs

func ConstellationsByIDs(ctx context.Context, ids []*int) ([]*model.Constellation, error)

ConstellationsByIDs takes a context for tracing and an array of IDs to query the Constellations by.

func FactionByID

func FactionByID(ctx context.Context, id *int) (*model.Faction, error)

FactionByID takes a context for tracing and an ID to query the Faction by.

func GraphicByID

func GraphicByID(ctx context.Context, id *int) (*model.Graphic, error)

GraphicByID takes a context for tracing and an ID to query the Graphic by.

func GroupByID

func GroupByID(ctx context.Context, id *int) (*model.Group, error)

GroupByID takes a context for tracing and an ID to query the Group by.

func IDForName added in v0.0.2

func IDForName(ctx context.Context, name *string, nameType string) (int, error)

IDForName takes a context for tracing and a common name of a type in EVE, Agent, Alliance, etc and a field representing the type being requested. Returns a name/id pair representing the object requested.

func ItemTypeByID

func ItemTypeByID(ctx context.Context, id *int) (*model.ItemType, error)

ItemTypeByID takes a context for tracing and an ID to query the Item Type by.

func ItemTypesByIDs

func ItemTypesByIDs(ctx context.Context, itemTypes []*int) ([]*model.ItemType, error)

ItemTypesByIDs takes a context for tracing and an ID to query the Item Types by.

func MoonByID

func MoonByID(ctx context.Context, id *int) (*model.Moon, error)

MoonByID takes a context for tracing and an ID to query the Moon by.

func MoonDetails

func MoonDetails(ctx context.Context, moons []*int) ([]*model.Moon, error)

MoonDetails takes a context for tracing and an array of IDs to query the Moons by.

func PlanetByID

func PlanetByID(ctx context.Context, id *int) (*model.Planet, error)

PlanetByID takes a context for tracing and an ID to query the Planet by.

func RaceByID

func RaceByID(ctx context.Context, id *int) (*model.Race, error)

RaceByID takes a context for tracing and an ID to query the Race by.

func RegionByID

func RegionByID(ctx context.Context, id *int) (*model.Region, error)

RegionByID takes a context for tracing and an ID to query the Region by.

func SetupUniverseRest

func SetupUniverseRest()

SetupUniverseRest configures dependencies for the Universe rest package

func StarByID

func StarByID(ctx context.Context, id *int) (*model.Star, error)

StarByID takes a context for tracing and an ID to query the Star by.

func StargateByID

func StargateByID(ctx context.Context, id *int) (*model.Stargate, error)

StargateByID takes a context for tracing and an ID to query the Stargate by.

func StargateDetails

func StargateDetails(ctx context.Context, stargates []*int) ([]*model.Stargate, error)

StargateDetails takes a context for tracing and an array of IDs to query the Stargates by.

func StationByID

func StationByID(ctx context.Context, id *int) (*model.Station, error)

StationByID takes a context for tracing and an ID to query the Station by.

func StationsByIDs

func StationsByIDs(ctx context.Context, ids []*int) ([]*model.Station, error)

StationsByIDs takes a context for tracing and an array of IDs to query the Stations by.

func SystemByID

func SystemByID(ctx context.Context, id *int) (*model.System, error)

SystemByID takes a context for tracing and an ID to query the System by.

func SystemsByIDs

func SystemsByIDs(ctx context.Context, ids []*int) ([]*model.System, error)

SystemsByIDs takes a context for tracing and an array of IDs to query the Systems by.

Types

type CacheClientInterface

type CacheClientInterface interface {
	AddToCache(ctx context.Context, key string, value []byte, ttl int64)
	CheckCache(ctx context.Context, key string) (bool, []byte)
}

CacheClientInterface is an interface for mocking during unit tests for the caching implementation

var (
	// CachingClient is for wiring in the implementation of caching that is decided by the config
	CachingClient CacheClientInterface
)

type RestHelper

type RestHelper interface {
	MakeCachingRESTCall(ctx context.Context, baseURL string, verb string, body bytes.Buffer, additionalQueryParams []configuration.KeyValue, redisQueryKey string) ([]byte, http.Header, error)
}

RestHelper is an interface used in mocking for unit tests.

Jump to

Keyboard shortcuts

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