storage

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package sqlite contains the logic for storing application data into a local SQLite database.

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("object not found")

Functions

func EveMoonFromDBModel

func EveMoonFromDBModel(p queries.EveMoon, ess *app.EveSolarSystem) *app.EveMoon

func InitDB

func InitDB(dsn string) (*sql.DB, error)

InitDB initializes the database and returns it.

func NewNullFloat64

func NewNullFloat64(v float64) sql.NullFloat64

func NewNullInt32

func NewNullInt32(v int32) sql.NullInt32

func NewNullInt64

func NewNullInt64(v int64) sql.NullInt64

func NewNullString

func NewNullString(v string) sql.NullString

func NewNullTime

func NewNullTime(v time.Time) sql.NullTime

Types

type CharacterSectionStatusParams

type CharacterSectionStatusParams struct {
	CharacterID int32
	Section     app.CharacterSection

	CompletedAt time.Time
	ContentHash string
	Error       string
	StartedAt   time.Time
}

type CreateCharacterAssetParams

type CreateCharacterAssetParams struct {
	CharacterID     int32
	EveTypeID       int32
	IsBlueprintCopy bool
	IsSingleton     bool
	ItemID          int64
	LocationFlag    string
	LocationID      int64
	LocationType    string
	Name            string
	Quantity        int32
}

type CreateCharacterImplantParams

type CreateCharacterImplantParams struct {
	CharacterID int32
	EveTypeID   int32
}

type CreateCharacterJumpCloneParams

type CreateCharacterJumpCloneParams struct {
	CharacterID int32
	JumpCloneID int64
	Implants    []int32
	LocationID  int64
	Name        string
}

type CreateCharacterMailParams

type CreateCharacterMailParams struct {
	Body         string
	CharacterID  int32
	FromID       int32
	LabelIDs     []int32
	IsProcessed  bool
	IsRead       bool
	MailID       int32
	RecipientIDs []int32
	Subject      string
	Timestamp    time.Time
}

type CreateCharacterNotificationParams

type CreateCharacterNotificationParams struct {
	Body           optional.Optional[string]
	CharacterID    int32
	IsRead         bool
	IsProcessed    bool
	NotificationID int64
	SenderID       int32
	Text           string
	Timestamp      time.Time
	Title          optional.Optional[string]
	Type           string
}

type CreateCharacterWalletJournalEntryParams

type CreateCharacterWalletJournalEntryParams struct {
	Amount        float64
	Balance       float64
	ContextID     int64
	ContextIDType string
	Date          time.Time
	Description   string
	FirstPartyID  int32
	RefID         int64
	CharacterID   int32
	Reason        string
	RefType       string
	SecondPartyID int32
	Tax           float64
	TaxReceiverID int32
}

type CreateCharacterWalletTransactionParams

type CreateCharacterWalletTransactionParams struct {
	ClientID      int32
	Date          time.Time
	EveTypeID     int32
	IsBuy         bool
	IsPersonal    bool
	JournalRefID  int64
	LocationID    int64
	CharacterID   int32
	Quantity      int32
	TransactionID int64
	UnitPrice     float64
}

type CreateEveCategoryParams

type CreateEveCategoryParams struct {
	ID          int32
	IsPublished bool
	Name        string
}

type CreateEveCharacterParams

type CreateEveCharacterParams struct {
	ID             int32
	AllianceID     int32
	Birthday       time.Time
	CorporationID  int32
	Description    string
	FactionID      int32
	Gender         string
	Name           string
	RaceID         int32
	SecurityStatus float64
	Title          string
}

type CreateEveConstellationParams

type CreateEveConstellationParams struct {
	ID       int32
	Name     string
	RegionID int32
}

type CreateEveDogmaAttributeParams

type CreateEveDogmaAttributeParams struct {
	ID           int32
	DefaultValue float32
	Description  string
	DisplayName  string
	IconID       int32
	Name         string
	IsHighGood   bool
	IsPublished  bool
	IsStackable  bool
	UnitID       app.EveUnitID
}

type CreateEveGroupParams

type CreateEveGroupParams struct {
	ID          int32
	CategoryID  int32
	IsPublished bool
	Name        string
}

type CreateEveMoonParams

type CreateEveMoonParams struct {
	ID            int32
	Name          string
	SolarSystemID int32
}

type CreateEvePlanetParams

type CreateEvePlanetParams struct {
	ID            int32
	Name          string
	SolarSystemID int32
	TypeID        int32
}

type CreateEveRegionParams

type CreateEveRegionParams struct {
	Description string
	ID          int32
	Name        string
}

type CreateEveSolarSystemParams

type CreateEveSolarSystemParams struct {
	ConstellationID int32
	ID              int32
	Name            string
	SecurityStatus  float32
}

type CreateEveTypeDogmaAttributeParams

type CreateEveTypeDogmaAttributeParams struct {
	DogmaAttributeID int32
	EveTypeID        int32
	Value            float32
}

type CreateEveTypeDogmaEffectParams

type CreateEveTypeDogmaEffectParams struct {
	DogmaEffectID int32
	EveTypeID     int32
	IsDefault     bool
}

type CreateEveTypeParams

type CreateEveTypeParams struct {
	ID             int32
	Capacity       float32
	Description    string
	GraphicID      int32
	GroupID        int32
	IconID         int32
	IsPublished    bool
	MarketGroupID  int32
	Mass           float32
	Name           string
	PackagedVolume float32
	PortionSize    int
	Radius         float32
	Volume         float32
}

type CreateShipSkillParams

type CreateShipSkillParams struct {
	Rank        uint
	ShipTypeID  int32
	SkillTypeID int32
	SkillLevel  uint
}

type MailLabelParams

type MailLabelParams struct {
	CharacterID int32
	Color       string
	LabelID     int32
	Name        string
	UnreadCount int
}

type SkillqueueItemParams

type SkillqueueItemParams struct {
	EveTypeID       int32
	FinishDate      time.Time
	FinishedLevel   int
	LevelEndSP      int
	LevelStartSP    int
	CharacterID     int32
	QueuePosition   int
	StartDate       time.Time
	TrainingStartSP int
}

type Storage

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

func New

func New(db *sql.DB) *Storage

New returns a new storage object.

func (*Storage) CalcCharacterNotificationUnreadCounts

func (st *Storage) CalcCharacterNotificationUnreadCounts(ctx context.Context, characterID int32) (map[string]int, error)

func (*Storage) CalculateCharacterAssetTotalValue

func (st *Storage) CalculateCharacterAssetTotalValue(ctx context.Context, characterID int32) (float64, error)

func (*Storage) CreateCharacterAsset

func (st *Storage) CreateCharacterAsset(ctx context.Context, arg CreateCharacterAssetParams) error

func (*Storage) CreateCharacterImplant

func (st *Storage) CreateCharacterImplant(ctx context.Context, arg CreateCharacterImplantParams) error

func (*Storage) CreateCharacterJumpClone

func (st *Storage) CreateCharacterJumpClone(ctx context.Context, arg CreateCharacterJumpCloneParams) error

func (*Storage) CreateCharacterMail

func (st *Storage) CreateCharacterMail(ctx context.Context, arg CreateCharacterMailParams) (int64, error)

func (*Storage) CreateCharacterMailList

func (st *Storage) CreateCharacterMailList(ctx context.Context, characterID, mailListID int32) error

func (*Storage) CreateCharacterNotification

func (st *Storage) CreateCharacterNotification(ctx context.Context, arg CreateCharacterNotificationParams) error

func (*Storage) CreateCharacterWalletJournalEntry

func (st *Storage) CreateCharacterWalletJournalEntry(ctx context.Context, arg CreateCharacterWalletJournalEntryParams) error

func (*Storage) CreateCharacterWalletTransaction

func (st *Storage) CreateCharacterWalletTransaction(ctx context.Context, arg CreateCharacterWalletTransactionParams) error

func (*Storage) CreateEveCategory

func (st *Storage) CreateEveCategory(ctx context.Context, arg CreateEveCategoryParams) (*app.EveCategory, error)

func (*Storage) CreateEveCharacter

func (st *Storage) CreateEveCharacter(ctx context.Context, arg CreateEveCharacterParams) error

func (*Storage) CreateEveConstellation

func (st *Storage) CreateEveConstellation(ctx context.Context, arg CreateEveConstellationParams) error

func (*Storage) CreateEveDogmaAttribute

func (st *Storage) CreateEveDogmaAttribute(ctx context.Context, arg CreateEveDogmaAttributeParams) (*app.EveDogmaAttribute, error)

func (*Storage) CreateEveEntity

func (st *Storage) CreateEveEntity(ctx context.Context, id int32, name string, category app.EveEntityCategory) (*app.EveEntity, error)

func (*Storage) CreateEveGroup

func (st *Storage) CreateEveGroup(ctx context.Context, arg CreateEveGroupParams) error

func (*Storage) CreateEveMoon

func (st *Storage) CreateEveMoon(ctx context.Context, arg CreateEveMoonParams) error

func (*Storage) CreateEvePlanet

func (st *Storage) CreateEvePlanet(ctx context.Context, arg CreateEvePlanetParams) error

func (*Storage) CreateEveRace

func (st *Storage) CreateEveRace(ctx context.Context, id int32, description, name string) (*app.EveRace, error)

func (*Storage) CreateEveRegion

func (st *Storage) CreateEveRegion(ctx context.Context, arg CreateEveRegionParams) (*app.EveRegion, error)

func (*Storage) CreateEveShipSkill

func (st *Storage) CreateEveShipSkill(ctx context.Context, arg CreateShipSkillParams) error

func (*Storage) CreateEveSolarSystem

func (st *Storage) CreateEveSolarSystem(ctx context.Context, arg CreateEveSolarSystemParams) error

func (*Storage) CreateEveType

func (st *Storage) CreateEveType(ctx context.Context, arg CreateEveTypeParams) error

func (*Storage) CreateEveTypeDogmaAttribute

func (st *Storage) CreateEveTypeDogmaAttribute(ctx context.Context, arg CreateEveTypeDogmaAttributeParams) error

func (*Storage) CreateEveTypeDogmaEffect

func (st *Storage) CreateEveTypeDogmaEffect(ctx context.Context, arg CreateEveTypeDogmaEffectParams) error

func (*Storage) CreateSkillqueueItem

func (st *Storage) CreateSkillqueueItem(ctx context.Context, arg SkillqueueItemParams) error

func (*Storage) DeleteCharacter

func (st *Storage) DeleteCharacter(ctx context.Context, characterID int32) error

func (*Storage) DeleteCharacterMail

func (st *Storage) DeleteCharacterMail(ctx context.Context, characterID, mailID int32) error

func (*Storage) DeleteEveCharacter

func (st *Storage) DeleteEveCharacter(ctx context.Context, characterID int32) error

func (*Storage) DeleteExcludedCharacterAssets

func (st *Storage) DeleteExcludedCharacterAssets(ctx context.Context, characterID int32, itemIDs []int64) error

func (*Storage) DeleteExcludedCharacterSkills

func (st *Storage) DeleteExcludedCharacterSkills(ctx context.Context, characterID int32, eveTypeIDs []int32) error

func (*Storage) DeleteObsoleteCharacterMailLabels

func (st *Storage) DeleteObsoleteCharacterMailLabels(ctx context.Context, characterID int32) error

func (*Storage) DeleteObsoleteCharacterMailLists

func (st *Storage) DeleteObsoleteCharacterMailLists(ctx context.Context, characterID int32) error

func (*Storage) GetCharacter

func (st *Storage) GetCharacter(ctx context.Context, characterID int32) (*app.Character, error)

func (*Storage) GetCharacterAsset

func (st *Storage) GetCharacterAsset(ctx context.Context, characterID int32, itemID int64) (*app.CharacterAsset, error)

func (*Storage) GetCharacterAssetValue

func (st *Storage) GetCharacterAssetValue(ctx context.Context, characterID int32) (optional.Optional[float64], error)

func (*Storage) GetCharacterAttributes

func (st *Storage) GetCharacterAttributes(ctx context.Context, characterID int32) (*app.CharacterAttributes, error)

func (*Storage) GetCharacterImplant

func (st *Storage) GetCharacterImplant(ctx context.Context, characterID int32, typeID int32) (*app.CharacterImplant, error)

func (*Storage) GetCharacterJumpClone

func (st *Storage) GetCharacterJumpClone(ctx context.Context, characterID int32, jumpCloneID int32) (*app.CharacterJumpClone, error)

func (*Storage) GetCharacterMail

func (st *Storage) GetCharacterMail(ctx context.Context, characterID, mailID int32) (*app.CharacterMail, error)

func (*Storage) GetCharacterMailCount

func (st *Storage) GetCharacterMailCount(ctx context.Context, characterID int32) (int, error)

func (*Storage) GetCharacterMailLabel

func (st *Storage) GetCharacterMailLabel(ctx context.Context, characterID, labelID int32) (*app.CharacterMailLabel, error)

func (*Storage) GetCharacterMailLabelUnreadCounts

func (st *Storage) GetCharacterMailLabelUnreadCounts(ctx context.Context, characterID int32) (map[int32]int, error)

func (*Storage) GetCharacterMailListUnreadCounts

func (st *Storage) GetCharacterMailListUnreadCounts(ctx context.Context, characterID int32) (map[int32]int, error)

func (*Storage) GetCharacterMailUnreadCount

func (st *Storage) GetCharacterMailUnreadCount(ctx context.Context, characterID int32) (int, error)

func (*Storage) GetCharacterNotification

func (st *Storage) GetCharacterNotification(ctx context.Context, characterID int32, notificationID int64) (*app.CharacterNotification, error)

func (*Storage) GetCharacterSectionStatus

func (st *Storage) GetCharacterSectionStatus(ctx context.Context, characterID int32, section app.CharacterSection) (*app.CharacterSectionStatus, error)

func (*Storage) GetCharacterSkill

func (st *Storage) GetCharacterSkill(ctx context.Context, characterID int32, typeID int32) (*app.CharacterSkill, error)

func (*Storage) GetCharacterToken

func (st *Storage) GetCharacterToken(ctx context.Context, characterID int32) (*app.CharacterToken, error)

func (*Storage) GetCharacterWalletJournalEntry

func (st *Storage) GetCharacterWalletJournalEntry(ctx context.Context, characterID int32, refID int64) (*app.CharacterWalletJournalEntry, error)

func (*Storage) GetCharacterWalletTransaction

func (st *Storage) GetCharacterWalletTransaction(ctx context.Context, characterID int32, transactionID int64) (*app.CharacterWalletTransaction, error)

func (*Storage) GetEveCategory

func (st *Storage) GetEveCategory(ctx context.Context, id int32) (*app.EveCategory, error)

func (*Storage) GetEveCharacter

func (st *Storage) GetEveCharacter(ctx context.Context, characterID int32) (*app.EveCharacter, error)

func (*Storage) GetEveConstellation

func (st *Storage) GetEveConstellation(ctx context.Context, id int32) (*app.EveConstellation, error)

func (*Storage) GetEveDogmaAttribute

func (st *Storage) GetEveDogmaAttribute(ctx context.Context, id int32) (*app.EveDogmaAttribute, error)

func (*Storage) GetEveEntity

func (st *Storage) GetEveEntity(ctx context.Context, id int32) (*app.EveEntity, error)

func (*Storage) GetEveGroup

func (st *Storage) GetEveGroup(ctx context.Context, id int32) (*app.EveGroup, error)

func (*Storage) GetEveLocation

func (st *Storage) GetEveLocation(ctx context.Context, id int64) (*app.EveLocation, error)

func (*Storage) GetEveMarketPrice

func (st *Storage) GetEveMarketPrice(ctx context.Context, typeID int32) (*app.EveMarketPrice, error)

func (*Storage) GetEveMoon

func (st *Storage) GetEveMoon(ctx context.Context, id int32) (*app.EveMoon, error)

func (*Storage) GetEvePlanet

func (st *Storage) GetEvePlanet(ctx context.Context, id int32) (*app.EvePlanet, error)

func (*Storage) GetEveRace

func (st *Storage) GetEveRace(ctx context.Context, id int32) (*app.EveRace, error)

func (*Storage) GetEveRegion

func (st *Storage) GetEveRegion(ctx context.Context, id int32) (*app.EveRegion, error)

func (*Storage) GetEveShipSkill

func (st *Storage) GetEveShipSkill(ctx context.Context, shipTypeID int32, rank uint) (*app.EveShipSkill, error)

func (*Storage) GetEveSolarSystem

func (st *Storage) GetEveSolarSystem(ctx context.Context, id int32) (*app.EveSolarSystem, error)

func (*Storage) GetEveType

func (st *Storage) GetEveType(ctx context.Context, id int32) (*app.EveType, error)

func (*Storage) GetEveTypeDogmaAttribute

func (st *Storage) GetEveTypeDogmaAttribute(ctx context.Context, eveTypeID, dogmaAttributeID int32) (float32, error)

func (*Storage) GetEveTypeDogmaEffect

func (st *Storage) GetEveTypeDogmaEffect(ctx context.Context, eveTypeID, dogmaAttributeID int32) (bool, error)

func (*Storage) GetFirstCharacter

func (st *Storage) GetFirstCharacter(ctx context.Context) (*app.Character, error)

func (*Storage) GetGeneralSectionStatus

func (st *Storage) GetGeneralSectionStatus(ctx context.Context, section app.GeneralSection) (*app.GeneralSectionStatus, error)

func (*Storage) GetOrCreateCharacterMailLabel

func (st *Storage) GetOrCreateCharacterMailLabel(ctx context.Context, arg MailLabelParams) (*app.CharacterMailLabel, error)

func (*Storage) GetOrCreateEveEntity

func (st *Storage) GetOrCreateEveEntity(ctx context.Context, id int32, name string, category app.EveEntityCategory) (*app.EveEntity, error)

func (*Storage) GetOrCreateNotificationType

func (st *Storage) GetOrCreateNotificationType(ctx context.Context, name string) (int64, error)

func (*Storage) GetSkillqueueItem

func (st *Storage) GetSkillqueueItem(ctx context.Context, characterID int32, pos int) (*app.CharacterSkillqueueItem, error)

func (*Storage) GetTotalTrainingTime

func (st *Storage) GetTotalTrainingTime(ctx context.Context, characterID int32) (optional.Optional[time.Duration], error)

func (*Storage) ListAllCharacterAssets

func (st *Storage) ListAllCharacterAssets(ctx context.Context) ([]*app.CharacterAsset, error)

func (*Storage) ListCharacterAssetIDs

func (st *Storage) ListCharacterAssetIDs(ctx context.Context, characterID int32) ([]int64, error)

func (*Storage) ListCharacterAssets

func (st *Storage) ListCharacterAssets(ctx context.Context, characterID int32) ([]*app.CharacterAsset, error)

func (*Storage) ListCharacterAssetsInItemHangar

func (st *Storage) ListCharacterAssetsInItemHangar(ctx context.Context, characterID int32, locationID int64) ([]*app.CharacterAsset, error)

func (*Storage) ListCharacterAssetsInLocation

func (st *Storage) ListCharacterAssetsInLocation(ctx context.Context, characterID int32, locationID int64) ([]*app.CharacterAsset, error)

func (*Storage) ListCharacterAssetsInShipHangar

func (st *Storage) ListCharacterAssetsInShipHangar(ctx context.Context, characterID int32, locationID int64) ([]*app.CharacterAsset, error)

func (*Storage) ListCharacterIDs

func (st *Storage) ListCharacterIDs(ctx context.Context) ([]int32, error)

func (*Storage) ListCharacterImplants

func (st *Storage) ListCharacterImplants(ctx context.Context, characterID int32) ([]*app.CharacterImplant, error)

func (*Storage) ListCharacterJumpClones

func (st *Storage) ListCharacterJumpClones(ctx context.Context, characterID int32) ([]*app.CharacterJumpClone, error)

func (*Storage) ListCharacterMailHeadersForLabelOrdered

func (st *Storage) ListCharacterMailHeadersForLabelOrdered(ctx context.Context, characterID int32, labelID int32) ([]*app.CharacterMailHeader, error)

ListMailsForLabel returns a character's mails for a label in descending order by timestamp. Return mails for all labels, when labelID = 0

func (*Storage) ListCharacterMailHeadersForListOrdered

func (st *Storage) ListCharacterMailHeadersForListOrdered(ctx context.Context, characterID int32, listID int32) ([]*app.CharacterMailHeader, error)

func (*Storage) ListCharacterMailHeadersForUnprocessed

func (st *Storage) ListCharacterMailHeadersForUnprocessed(ctx context.Context, characterID int32) ([]*app.CharacterMailHeader, error)

func (*Storage) ListCharacterMailIDs

func (st *Storage) ListCharacterMailIDs(ctx context.Context, characterID int32) ([]int32, error)

func (*Storage) ListCharacterMailLabelsOrdered

func (st *Storage) ListCharacterMailLabelsOrdered(ctx context.Context, characterID int32) ([]*app.CharacterMailLabel, error)

func (*Storage) ListCharacterMailListsOrdered

func (st *Storage) ListCharacterMailListsOrdered(ctx context.Context, characterID int32) ([]*app.EveEntity, error)

func (*Storage) ListCharacterNotificationIDs

func (st *Storage) ListCharacterNotificationIDs(ctx context.Context, characterID int32) ([]int64, error)

func (*Storage) ListCharacterNotificationsTypes

func (st *Storage) ListCharacterNotificationsTypes(ctx context.Context, characterID int32, types []string) ([]*app.CharacterNotification, error)

func (*Storage) ListCharacterNotificationsUnprocessed

func (st *Storage) ListCharacterNotificationsUnprocessed(ctx context.Context, characterID int32) ([]*app.CharacterNotification, error)

func (*Storage) ListCharacterNotificationsUnread

func (st *Storage) ListCharacterNotificationsUnread(ctx context.Context, characterID int32) ([]*app.CharacterNotification, error)

func (*Storage) ListCharacterSectionStatus

func (st *Storage) ListCharacterSectionStatus(ctx context.Context, characterID int32) ([]*app.CharacterSectionStatus, error)

func (*Storage) ListCharacterShipSkills

func (st *Storage) ListCharacterShipSkills(ctx context.Context, characterID, shipTypeID int32) ([]*app.CharacterShipSkill, error)

func (*Storage) ListCharacterShipsAbilities

func (st *Storage) ListCharacterShipsAbilities(ctx context.Context, characterID int32, search string) ([]*app.CharacterShipAbility, error)

func (*Storage) ListCharacterSkillGroupsProgress

func (st *Storage) ListCharacterSkillGroupsProgress(ctx context.Context, characterID int32) ([]app.ListCharacterSkillGroupProgress, error)

func (*Storage) ListCharacterSkillProgress

func (st *Storage) ListCharacterSkillProgress(ctx context.Context, characterID, eveGroupID int32) ([]app.ListCharacterSkillProgress, error)

func (*Storage) ListCharacterWalletJournalEntries

func (st *Storage) ListCharacterWalletJournalEntries(ctx context.Context, characterID int32) ([]*app.CharacterWalletJournalEntry, error)

func (*Storage) ListCharacterWalletJournalEntryIDs

func (st *Storage) ListCharacterWalletJournalEntryIDs(ctx context.Context, characterID int32) ([]int64, error)

func (*Storage) ListCharacterWalletTransactionIDs

func (st *Storage) ListCharacterWalletTransactionIDs(ctx context.Context, characterID int32) ([]int64, error)

func (*Storage) ListCharacterWalletTransactions

func (st *Storage) ListCharacterWalletTransactions(ctx context.Context, characterID int32) ([]*app.CharacterWalletTransaction, error)

func (*Storage) ListCharacters

func (st *Storage) ListCharacters(ctx context.Context) ([]*app.Character, error)

func (*Storage) ListCharactersShort

func (st *Storage) ListCharactersShort(ctx context.Context) ([]*app.CharacterShort, error)

func (*Storage) ListEveCharacterIDs

func (st *Storage) ListEveCharacterIDs(ctx context.Context) ([]int32, error)

func (*Storage) ListEveEntitiesByName

func (st *Storage) ListEveEntitiesByName(ctx context.Context, name string) ([]*app.EveEntity, error)

func (*Storage) ListEveEntitiesByPartialName

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

func (*Storage) ListEveEntityByNameAndCategory

func (st *Storage) ListEveEntityByNameAndCategory(ctx context.Context, name string, category app.EveEntityCategory) ([]*app.EveEntity, error)

func (*Storage) ListEveEntityIDs

func (st *Storage) ListEveEntityIDs(ctx context.Context) ([]int32, error)

func (*Storage) ListEveLocation

func (st *Storage) ListEveLocation(ctx context.Context) ([]*app.EveLocation, error)

func (*Storage) ListEveShipSkills

func (st *Storage) ListEveShipSkills(ctx context.Context, shipTypeID int32) ([]*app.EveShipSkill, error)

func (*Storage) ListEveTypeDogmaAttributesForType

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

func (*Storage) ListGeneralSectionStatus

func (st *Storage) ListGeneralSectionStatus(ctx context.Context) ([]*app.GeneralSectionStatus, error)

func (*Storage) ListSkillqueueItems

func (st *Storage) ListSkillqueueItems(ctx context.Context, characterID int32) ([]*app.CharacterSkillqueueItem, error)

func (*Storage) MissingEveEntityIDs

func (st *Storage) MissingEveEntityIDs(ctx context.Context, ids []int32) (*set.Set[int32], error)

MissingEveEntityIDs returns the IDs, which are have no respective EveEntity in the database. IDs with value 0 are ignored.

func (*Storage) MissingEveLocations

func (st *Storage) MissingEveLocations(ctx context.Context, ids []int64) ([]int64, error)

func (*Storage) MissingEveTypes

func (st *Storage) MissingEveTypes(ctx context.Context, ids []int32) ([]int32, error)

func (*Storage) ReplaceCharacterImplants

func (st *Storage) ReplaceCharacterImplants(ctx context.Context, characterID int32, args []CreateCharacterImplantParams) error

func (*Storage) ReplaceCharacterJumpClones

func (st *Storage) ReplaceCharacterJumpClones(ctx context.Context, characterID int32, args []CreateCharacterJumpCloneParams) error

func (*Storage) ReplaceCharacterSkillqueueItems

func (st *Storage) ReplaceCharacterSkillqueueItems(ctx context.Context, characterID int32, args []SkillqueueItemParams) error

func (*Storage) UpdateCharacterAsset

func (st *Storage) UpdateCharacterAsset(ctx context.Context, arg UpdateCharacterAssetParams) error

func (*Storage) UpdateCharacterAssetValue

func (st *Storage) UpdateCharacterAssetValue(ctx context.Context, characterID int32, v optional.Optional[float64]) error

func (*Storage) UpdateCharacterHome

func (st *Storage) UpdateCharacterHome(ctx context.Context, characterID int32, homeID optional.Optional[int64]) error

func (*Storage) UpdateCharacterLastLoginAt

func (st *Storage) UpdateCharacterLastLoginAt(ctx context.Context, characterID int32, v optional.Optional[time.Time]) error

func (*Storage) UpdateCharacterLocation

func (st *Storage) UpdateCharacterLocation(ctx context.Context, characterID int32, locationID optional.Optional[int64]) error

func (*Storage) UpdateCharacterMail

func (st *Storage) UpdateCharacterMail(ctx context.Context, characterID int32, mailPK int64, isRead bool, labelIDs []int32) error

func (*Storage) UpdateCharacterMailSetProcessed

func (st *Storage) UpdateCharacterMailSetProcessed(ctx context.Context, id int64) error

func (*Storage) UpdateCharacterNotification

func (st *Storage) UpdateCharacterNotification(ctx context.Context, arg UpdateCharacterNotificationParams) error

func (*Storage) UpdateCharacterNotificationSetProcessed

func (st *Storage) UpdateCharacterNotificationSetProcessed(ctx context.Context, id int64) error

func (*Storage) UpdateCharacterShip

func (st *Storage) UpdateCharacterShip(ctx context.Context, characterID int32, shipID optional.Optional[int32]) error

func (*Storage) UpdateCharacterSkillPoints

func (st *Storage) UpdateCharacterSkillPoints(ctx context.Context, characterID int32, totalSP, unallocatedSP optional.Optional[int]) error

func (*Storage) UpdateCharacterWalletBalance

func (st *Storage) UpdateCharacterWalletBalance(ctx context.Context, characterID int32, v optional.Optional[float64]) error

func (*Storage) UpdateEveCharacter

func (st *Storage) UpdateEveCharacter(ctx context.Context, c *app.EveCharacter) error

func (*Storage) UpdateEveShipSkills

func (st *Storage) UpdateEveShipSkills(ctx context.Context) error

func (*Storage) UpdateOrCreateCharacter

func (st *Storage) UpdateOrCreateCharacter(ctx context.Context, arg UpdateOrCreateCharacterParams) error

func (*Storage) UpdateOrCreateCharacterAttributes

func (st *Storage) UpdateOrCreateCharacterAttributes(ctx context.Context, arg UpdateOrCreateCharacterAttributesParams) error

func (*Storage) UpdateOrCreateCharacterMailLabel

func (st *Storage) UpdateOrCreateCharacterMailLabel(ctx context.Context, arg MailLabelParams) (*app.CharacterMailLabel, error)

func (*Storage) UpdateOrCreateCharacterSectionStatus

func (st *Storage) UpdateOrCreateCharacterSectionStatus(ctx context.Context, arg UpdateOrCreateCharacterSectionStatusParams) (*app.CharacterSectionStatus, error)

func (*Storage) UpdateOrCreateCharacterSkill

func (st *Storage) UpdateOrCreateCharacterSkill(ctx context.Context, arg UpdateOrCreateCharacterSkillParams) error

func (*Storage) UpdateOrCreateCharacterToken

func (st *Storage) UpdateOrCreateCharacterToken(ctx context.Context, t *app.CharacterToken) error

func (*Storage) UpdateOrCreateEveEntity

func (st *Storage) UpdateOrCreateEveEntity(ctx context.Context, id int32, name string, category app.EveEntityCategory) (*app.EveEntity, error)

func (*Storage) UpdateOrCreateEveLocation

func (st *Storage) UpdateOrCreateEveLocation(ctx context.Context, arg UpdateOrCreateLocationParams) error

func (*Storage) UpdateOrCreateEveMarketPrice

func (st *Storage) UpdateOrCreateEveMarketPrice(ctx context.Context, arg UpdateOrCreateEveMarketPriceParams) error

func (*Storage) UpdateOrCreateGeneralSectionStatus

func (st *Storage) UpdateOrCreateGeneralSectionStatus(ctx context.Context, arg UpdateOrCreateGeneralSectionStatusParams) (*app.GeneralSectionStatus, error)

type UpdateCharacterAssetParams

type UpdateCharacterAssetParams struct {
	CharacterID  int32
	ItemID       int64
	LocationFlag string
	LocationID   int64
	LocationType string
	Name         string
	Quantity     int32
}

type UpdateCharacterNotificationParams

type UpdateCharacterNotificationParams struct {
	ID          int64
	Body        optional.Optional[string]
	CharacterID int32
	IsRead      bool
	Title       optional.Optional[string]
}

type UpdateOrCreateCharacterAttributesParams

type UpdateOrCreateCharacterAttributesParams struct {
	ID            int64
	BonusRemaps   int
	CharacterID   int32
	Charisma      int
	Intelligence  int
	LastRemapDate time.Time
	Memory        int
	Perception    int
	Willpower     int
}

type UpdateOrCreateCharacterParams

type UpdateOrCreateCharacterParams struct {
	AssetValue    optional.Optional[float64]
	ID            int32
	HomeID        optional.Optional[int64]
	LastLoginAt   optional.Optional[time.Time]
	LocationID    optional.Optional[int64]
	ShipID        optional.Optional[int32]
	TotalSP       optional.Optional[int]
	UnallocatedSP optional.Optional[int]
	WalletBalance optional.Optional[float64]
}

type UpdateOrCreateCharacterSectionStatusParams

type UpdateOrCreateCharacterSectionStatusParams struct {
	// mandatory
	CharacterID int32
	Section     app.CharacterSection
	// optional
	CompletedAt  *sql.NullTime
	ContentHash  *string
	ErrorMessage *string
	StartedAt    *optional.Optional[time.Time]
}

type UpdateOrCreateCharacterSkillParams

type UpdateOrCreateCharacterSkillParams struct {
	ActiveSkillLevel   int
	EveTypeID          int32
	SkillPointsInSkill int
	CharacterID        int32
	TrainedSkillLevel  int
}

type UpdateOrCreateEveMarketPriceParams

type UpdateOrCreateEveMarketPriceParams struct {
	TypeID        int32
	AdjustedPrice float64
	AveragePrice  float64
}

type UpdateOrCreateGeneralSectionStatusParams

type UpdateOrCreateGeneralSectionStatusParams struct {
	// Mandatory
	Section app.GeneralSection
	// Optional
	CompletedAt *sql.NullTime
	ContentHash *string
	Error       *string
	StartedAt   *optional.Optional[time.Time]
}

type UpdateOrCreateLocationParams

type UpdateOrCreateLocationParams struct {
	ID               int64
	EveSolarSystemID optional.Optional[int32]
	EveTypeID        optional.Optional[int32]
	Name             string
	OwnerID          optional.Optional[int32]
	UpdatedAt        time.Time
}

Directories

Path Synopsis
Package factory contains factories for creating test objects in the repository
Package factory contains factories for creating test objects in the repository

Jump to

Keyboard shortcuts

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