character

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: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ByID added in v0.0.2

func ByID(ctx context.Context, id *int) (*model.Character, error)

ByID returns the character indicated by the id field, the context is used for tracing. If the character is cached the ESI will not be called until the ttl and the cached instance will be returned.

func CorporationHistory

func CorporationHistory(ctx context.Context, id *int) ([]*model.CorporationHistory, error)

CorporationHistory returns the corporation history of the character indicated by the id field, the context is used for tracing. If the corporation history is cached the ESI will not be called until the ttl and the cached instance will be returned.

func PortraitByID added in v0.0.2

func PortraitByID(ctx context.Context, id *int) (*model.CharacterPortrait, error)

PortraitByID returns the character portrait indicated by the id field, the context is used for tracing. If the character portrait is cached the ESI will not be called until the ttl and the cached instance will be returned.

func SetupCharacterRest

func SetupCharacterRest()

SetupCharacterRest Injects required dependencies into the character package.

Types

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