cache

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: May 2, 2022 License: MIT Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AllianceAPI

type AllianceAPI interface {
	Alliance(ctx context.Context, allianceID uint) (*skillz.Alliance, error)
	SetAlliance(ctx context.Context, alliance *skillz.Alliance, expires time.Duration) error
}

type AuthAPI

type AuthAPI interface {
	JSONWebKeySet(ctx context.Context) ([]byte, error)
	SaveJSONWebKeySet(ctx context.Context, jwks []byte) error
	AuthAttempt(ctx context.Context, hash string) (*skillz.AuthAttempt, error)
	CreateAuthAttempt(ctx context.Context, attempt *skillz.AuthAttempt) error
	DeleteAuthAttempt(ctx context.Context, attempt *skillz.AuthAttempt) error
}

type CharacterAPI

type CharacterAPI interface {
	Character(ctx context.Context, characterID uint64) (*skillz.Character, error)
	SetCharacter(ctx context.Context, character *skillz.Character, expires time.Duration) error
}

type CloneAPI

type CloneAPI interface {
	CharacterImplants(ctx context.Context, characterID uint64) ([]*skillz.CharacterImplant, error)
	SetCharacterImplants(ctx context.Context, characterID uint64, implants []*skillz.CharacterImplant, expires time.Duration) error
}

type CorporationAPI

type CorporationAPI interface {
	Corporation(ctx context.Context, corporationID uint) (*skillz.Corporation, error)
	SetCorporation(ctx context.Context, corporation *skillz.Corporation, expires time.Duration) error
}

type EtagAPI

type EtagAPI interface {
	EtagByPath(ctx context.Context, path string) (*skillz.Etag, error)
	SetEtag(ctx context.Context, etag *skillz.Etag, expires time.Duration) error
}

type Service

type Service struct {
	// contains filtered or unexported fields
}

func New

func New(redis *redis.Client, disabled bool) *Service

func (*Service) Alliance

func (s *Service) Alliance(ctx context.Context, allianceID uint) (*skillz.Alliance, error)

func (*Service) AuthAttempt

func (s *Service) AuthAttempt(ctx context.Context, state string) (*skillz.AuthAttempt, error)

func (*Service) Bloodline

func (s *Service) Bloodline(ctx context.Context, bloodlineID uint) (*skillz.Bloodline, error)

func (*Service) BustNewUsersBySP added in v0.0.9

func (s *Service) BustNewUsersBySP(ctx context.Context) error

func (*Service) Category

func (s *Service) Category(ctx context.Context, id uint) (*skillz.Category, error)

func (*Service) Character

func (s *Service) Character(ctx context.Context, characterID uint64) (*skillz.Character, error)

func (*Service) CharacterAttributes

func (s *Service) CharacterAttributes(ctx context.Context, characterID uint64) (*skillz.CharacterAttributes, error)

func (*Service) CharacterFlyableShips

func (s *Service) CharacterFlyableShips(ctx context.Context, characterID uint64) ([]*skillz.ShipGroup, error)

func (*Service) CharacterGroupedSkillz

func (s *Service) CharacterGroupedSkillz(ctx context.Context, characterID uint64) ([]*skillz.CharacterSkillGroup, error)

func (*Service) CharacterImplants

func (s *Service) CharacterImplants(ctx context.Context, characterID uint64) ([]*skillz.CharacterImplant, error)

func (*Service) CharacterSkillMeta

func (s *Service) CharacterSkillMeta(ctx context.Context, characterID uint64) (*skillz.CharacterSkillMeta, error)

func (*Service) CharacterSkillQueueSummary added in v0.2.2

func (s *Service) CharacterSkillQueueSummary(ctx context.Context, characterID uint64) (*skillz.CharacterSkillQueueSummary, error)

func (*Service) CharacterSkills

func (s *Service) CharacterSkills(ctx context.Context, characterID uint64) ([]*skillz.CharacterSkill, error)

func (*Service) Constellation

func (s *Service) Constellation(ctx context.Context, id uint) (*skillz.Constellation, error)

func (*Service) Corporation

func (s *Service) Corporation(ctx context.Context, corporationID uint) (*skillz.Corporation, error)

func (*Service) CreateAuthAttempt

func (s *Service) CreateAuthAttempt(ctx context.Context, attempt *skillz.AuthAttempt) error

func (*Service) DeleteAuthAttempt

func (s *Service) DeleteAuthAttempt(ctx context.Context, attempt *skillz.AuthAttempt) error

func (*Service) EtagByPath

func (s *Service) EtagByPath(ctx context.Context, path string) (*skillz.Etag, error)

func (*Service) Faction

func (s *Service) Faction(ctx context.Context, id uint) (*skillz.Faction, error)

func (*Service) Group

func (s *Service) Group(ctx context.Context, id uint) (*skillz.Group, error)

func (*Service) GroupsByCategoryID

func (s *Service) GroupsByCategoryID(ctx context.Context, id uint) ([]*skillz.Group, error)

func (*Service) JSONWebKeySet

func (s *Service) JSONWebKeySet(ctx context.Context) ([]byte, error)

func (*Service) NewUsersBySP

func (s *Service) NewUsersBySP(ctx context.Context) ([]*skillz.User, error)

func (*Service) Race

func (s *Service) Race(ctx context.Context, id uint) (*skillz.Race, error)

func (*Service) RecentUsers added in v0.2.2

func (s *Service) RecentUsers(ctx context.Context) (*skillz.RecentUsers, error)

func (*Service) Region

func (s *Service) Region(ctx context.Context, id uint) (*skillz.Region, error)

func (*Service) ResetUserCache added in v0.2.2

func (s *Service) ResetUserCache(ctx context.Context, user *skillz.User) error

func (*Service) SaveJSONWebKeySet

func (s *Service) SaveJSONWebKeySet(ctx context.Context, jwks []byte) error

func (*Service) SearchUsers

func (s *Service) SearchUsers(ctx context.Context, q string) ([]*skillz.UserSearchResult, error)

func (*Service) SetAlliance

func (s *Service) SetAlliance(ctx context.Context, alliance *skillz.Alliance, expires time.Duration) error

func (*Service) SetBloodline

func (s *Service) SetBloodline(ctx context.Context, bloodline *skillz.Bloodline) error

func (*Service) SetCategory

func (s *Service) SetCategory(ctx context.Context, category *skillz.Category) error

func (*Service) SetCharacter

func (s *Service) SetCharacter(ctx context.Context, character *skillz.Character, expires time.Duration) error

func (*Service) SetCharacterAttributes

func (s *Service) SetCharacterAttributes(ctx context.Context, meta *skillz.CharacterAttributes, expires time.Duration) error

func (*Service) SetCharacterFlyableShips

func (s *Service) SetCharacterFlyableShips(ctx context.Context, characterID uint64, flyable []*skillz.ShipGroup, expires time.Duration) error

func (*Service) SetCharacterGroupedSkillz

func (s *Service) SetCharacterGroupedSkillz(ctx context.Context, characterID uint64, groups []*skillz.CharacterSkillGroup, expires time.Duration) error

func (*Service) SetCharacterImplants

func (s *Service) SetCharacterImplants(ctx context.Context, characterID uint64, implants []*skillz.CharacterImplant, expires time.Duration) error

func (*Service) SetCharacterSkillMeta

func (s *Service) SetCharacterSkillMeta(ctx context.Context, meta *skillz.CharacterSkillMeta, expires time.Duration) error

func (*Service) SetCharacterSkillQueueSummary added in v0.2.2

func (s *Service) SetCharacterSkillQueueSummary(ctx context.Context, characterID uint64, summary *skillz.CharacterSkillQueueSummary, expires time.Duration) error

func (*Service) SetCharacterSkills

func (s *Service) SetCharacterSkills(ctx context.Context, characterID uint64, skills []*skillz.CharacterSkill, expires time.Duration) error

func (*Service) SetConstellation

func (s *Service) SetConstellation(ctx context.Context, constellation *skillz.Constellation) error

func (*Service) SetCorporation

func (s *Service) SetCorporation(ctx context.Context, corporation *skillz.Corporation, expires time.Duration) error

func (*Service) SetEtag

func (s *Service) SetEtag(ctx context.Context, etag *skillz.Etag, expires time.Duration) error

func (*Service) SetFaction

func (s *Service) SetFaction(ctx context.Context, faction *skillz.Faction) error

func (*Service) SetGroup

func (s *Service) SetGroup(ctx context.Context, group *skillz.Group) error

func (*Service) SetGroupsByCategoryID

func (s *Service) SetGroupsByCategoryID(ctx context.Context, categoryID uint, groups []*skillz.Group) error

func (*Service) SetNewUsersBySP

func (s *Service) SetNewUsersBySP(ctx context.Context, users []*skillz.User, expires time.Duration) error

func (*Service) SetRace

func (s *Service) SetRace(ctx context.Context, race *skillz.Race) error

func (*Service) SetRegion

func (s *Service) SetRegion(ctx context.Context, region *skillz.Region) error

func (*Service) SetSearchUsersResults

func (s *Service) SetSearchUsersResults(ctx context.Context, q string, users []*skillz.UserSearchResult, expires time.Duration) error

func (*Service) SetShipTypes added in v0.2.2

func (s *Service) SetShipTypes(ctx context.Context, items []*skillz.Type, expires time.Duration) error

func (*Service) SetSkillGroups added in v0.2.2

func (s *Service) SetSkillGroups(ctx context.Context, groups []*skillz.Group, expires time.Duration) error

func (*Service) SetSkillTypes added in v0.2.2

func (s *Service) SetSkillTypes(ctx context.Context, items []*skillz.Type, expires time.Duration) error

func (*Service) SetSolarSystem

func (s *Service) SetSolarSystem(ctx context.Context, solarSystem *skillz.SolarSystem) error

func (*Service) SetStation

func (s *Service) SetStation(ctx context.Context, station *skillz.Station) error

func (*Service) SetStructure

func (s *Service) SetStructure(ctx context.Context, structure *skillz.Structure) error

func (*Service) SetType

func (s *Service) SetType(ctx context.Context, item *skillz.Type) error

func (*Service) SetTypeAttributes

func (s *Service) SetTypeAttributes(ctx context.Context, id uint, attributes []*skillz.TypeDogmaAttribute) error

func (*Service) SetTypesByGroupID

func (s *Service) SetTypesByGroupID(ctx context.Context, groupID uint, types []*skillz.Type) error

func (*Service) SetUserSettings added in v0.0.14

func (s *Service) SetUserSettings(ctx context.Context, id string, settings *skillz.UserSettings, expires time.Duration) error

func (*Service) ShipTypes added in v0.2.2

func (s *Service) ShipTypes(ctx context.Context) ([]*skillz.Type, error)

func (*Service) SkillGroups added in v0.2.2

func (s *Service) SkillGroups(ctx context.Context) ([]*skillz.Group, error)

func (*Service) SkillTypes added in v0.2.2

func (s *Service) SkillTypes(ctx context.Context) ([]*skillz.Type, error)

func (*Service) SolarSystem

func (s *Service) SolarSystem(ctx context.Context, id uint) (*skillz.SolarSystem, error)

func (*Service) Station

func (s *Service) Station(ctx context.Context, id uint) (*skillz.Station, error)

func (*Service) Structure

func (s *Service) Structure(ctx context.Context, id uint64) (*skillz.Structure, error)

func (*Service) Type

func (s *Service) Type(ctx context.Context, id uint) (*skillz.Type, error)

func (*Service) TypeAttributes

func (s *Service) TypeAttributes(ctx context.Context, id uint) ([]*skillz.TypeDogmaAttribute, error)

func (*Service) TypesByGroupID

func (s *Service) TypesByGroupID(ctx context.Context, id uint) ([]*skillz.Type, error)

func (*Service) UserSettings added in v0.0.14

func (s *Service) UserSettings(ctx context.Context, id string) (*skillz.UserSettings, error)

type SkillAPI

type SkillAPI interface {
	CharacterSkillMeta(ctx context.Context, characterID uint64) (*skillz.CharacterSkillMeta, error)
	SetCharacterSkillMeta(ctx context.Context, meta *skillz.CharacterSkillMeta, expires time.Duration) error
	CharacterAttributes(ctx context.Context, characterID uint64) (*skillz.CharacterAttributes, error)
	SetCharacterAttributes(ctx context.Context, meta *skillz.CharacterAttributes, expires time.Duration) error
	CharacterSkills(ctx context.Context, characterID uint64) ([]*skillz.CharacterSkill, error)
	SetCharacterSkills(ctx context.Context, characterID uint64, skills []*skillz.CharacterSkill, expires time.Duration) error
	CharacterGroupedSkillz(ctx context.Context, characterID uint64) ([]*skillz.CharacterSkillGroup, error)
	SetCharacterGroupedSkillz(ctx context.Context, characterID uint64, groups []*skillz.CharacterSkillGroup, expires time.Duration) error
	// CharacterSkillQueue(ctx context.Context, characterID uint64) ([]*skillz.CharacterSkillQueue, error)
	// SetCharacterSkillQueue(ctx context.Context, characterID uint64, positions []*skillz.CharacterSkillQueue, expires time.Duration) error
	CharacterSkillQueueSummary(ctx context.Context, characterID uint64) (*skillz.CharacterSkillQueueSummary, error)
	SetCharacterSkillQueueSummary(ctx context.Context, characterID uint64, summary *skillz.CharacterSkillQueueSummary, expires time.Duration) error
	CharacterFlyableShips(ctx context.Context, characterID uint64) ([]*skillz.ShipGroup, error)
	SetCharacterFlyableShips(ctx context.Context, characterID uint64, flyable []*skillz.ShipGroup, expires time.Duration) error
}

type UniverseAPI

type UniverseAPI interface {
	Bloodline(ctx context.Context, id uint) (*skillz.Bloodline, error)
	SetBloodline(ctx context.Context, bloodline *skillz.Bloodline) error
	Race(ctx context.Context, id uint) (*skillz.Race, error)
	SetRace(ctx context.Context, race *skillz.Race) error
	Faction(ctx context.Context, id uint) (*skillz.Faction, error)
	SetFaction(ctx context.Context, faction *skillz.Faction) error
	Region(ctx context.Context, id uint) (*skillz.Region, error)
	SetRegion(ctx context.Context, region *skillz.Region) error
	Constellation(ctx context.Context, id uint) (*skillz.Constellation, error)
	SetConstellation(ctx context.Context, constellation *skillz.Constellation) error
	SolarSystem(ctx context.Context, id uint) (*skillz.SolarSystem, error)
	SetSolarSystem(ctx context.Context, solarSystem *skillz.SolarSystem) error
	Station(ctx context.Context, id uint) (*skillz.Station, error)
	SetStation(ctx context.Context, station *skillz.Station) error
	Structure(ctx context.Context, id uint64) (*skillz.Structure, error)
	SetStructure(ctx context.Context, structure *skillz.Structure) error
	Category(ctx context.Context, id uint) (*skillz.Category, error)
	SetCategory(ctx context.Context, category *skillz.Category) error
	Group(ctx context.Context, id uint) (*skillz.Group, error)
	SetGroup(ctx context.Context, group *skillz.Group) error
	GroupsByCategoryID(ctx context.Context, id uint) ([]*skillz.Group, error)
	SetGroupsByCategoryID(ctx context.Context, categoryID uint, groups []*skillz.Group) error
	Type(ctx context.Context, id uint) (*skillz.Type, error)
	SetType(ctx context.Context, item *skillz.Type) error
	SkillTypes(ctx context.Context) ([]*skillz.Type, error)
	SetSkillTypes(ctx context.Context, items []*skillz.Type, expires time.Duration) error
	SkillGroups(ctx context.Context) ([]*skillz.Group, error)
	SetSkillGroups(ctx context.Context, items []*skillz.Group, expires time.Duration) error
	ShipTypes(ctx context.Context) ([]*skillz.Type, error)
	SetShipTypes(ctx context.Context, items []*skillz.Type, expires time.Duration) error
	TypeAttributes(ctx context.Context, id uint) ([]*skillz.TypeDogmaAttribute, error)
	SetTypeAttributes(ctx context.Context, id uint, attributes []*skillz.TypeDogmaAttribute) error
	TypesByGroupID(ctx context.Context, id uint) ([]*skillz.Type, error)
	SetTypesByGroupID(ctx context.Context, groupID uint, types []*skillz.Type) error
}

type UserAPI

type UserAPI interface {
	UserSettings(ctx context.Context, id string) (*skillz.UserSettings, error)
	SetUserSettings(ctx context.Context, id string, settings *skillz.UserSettings, expires time.Duration) error

	SearchUsers(ctx context.Context, q string) ([]*skillz.UserSearchResult, error)
	SetSearchUsersResults(ctx context.Context, q string, users []*skillz.UserSearchResult, expires time.Duration) error
	NewUsersBySP(ctx context.Context) ([]*skillz.User, error)
	SetNewUsersBySP(ctx context.Context, users []*skillz.User, expires time.Duration) error

	BustNewUsersBySP(ctx context.Context) error
	ResetUserCache(ctx context.Context, user *skillz.User) error
}

Jump to

Keyboard shortcuts

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