gen

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: May 6, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Code generated by sqlc-gen-enum. DO NOT EDIT.

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type Assignment

type Assignment struct {
	ID int64
	// The title of the assignment
	Title string
	// A long form description of the assignment, usually contains context
	Briefing string
	// A very short summary of the description
	Description string
	// The date when the assignment will expire.
	Expiration pgtype.Timestamp
	// A list of tasks that need to be completed for this assignment
	TaskIds []int64
	// The type of reward (medals, super credits, ...)
	RewardType int32
	// The amount of Type that will be awarded
	RewardAmount int32
}

Represents an assignment given by Super Earth to the community. This is also known as "Major Order"s in the game

type AssignmentSnapshot

type AssignmentSnapshot struct {
	ID           int64
	AssignmentID int64
	// A list of numbers, how they represent progress is unknown.
	Progress []int32
}

type AssignmentTask

type AssignmentTask struct {
	// Auto-generated by sequence
	ID int64
	// The type of task this represents
	TaskType int32
	// A list of numbers, purpose unknown
	Values []int32
	// A list of numbers, purpose unknown
	ValueTypes []int32
}

Represents a task in an Assignment that needs to be completed to finish the assignment

type Biome

type Biome struct {
	Name        string
	Description string
}

Represents information about a biomes of a planet.

type Campaign

type Campaign struct {
	// The unique identifier of this campaign
	ID int32
	// The type of campaign, this should be mapped onto an enum
	Type int32
	// Indicates how many campaigns have already been fought on this Planet
	Count int32
}

Represents an ongoing campaign on a planet

type DBTX

type DBTX interface {
	Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error)
	Query(context.Context, string, ...interface{}) (pgx.Rows, error)
	QueryRow(context.Context, string, ...interface{}) pgx.Row
}

type Dispatch

type Dispatch struct {
	// The unique identifier of this dispatch
	ID int32
	// When the dispatch was published
	CreateTime pgtype.Timestamp
	// The type of dispatch, purpose unknown
	Type int32
	// The message this dispatch represents
	Message string
}

Represents a message from high command to the players, usually updates on the status of the war effort.

type Event

type Event struct {
	ID         int32
	CampaignID int32
	// The type of event
	Type int32
	// The faction that initiated the event
	Faction string
	// The maximum health of the Event at the time of snapshot
	MaxHealth int64
	// When the event started
	StartTime pgtype.Timestamp
	// When the event will end (or has ended).
	EndTime pgtype.Timestamp
}

Represents an ongoing event on a Planet.

type EventSnapshot

type EventSnapshot struct {
	// Auto-generated by sequence
	ID      int64
	EventID int32
	Health  int64
}

Contains dynamic data about a currently-ongoing event

type Hazard

type Hazard struct {
	Name        string
	Description string
}

Describes an environmental hazards that can be present on a planet

type InsertAssignmentSnapshotParams

type InsertAssignmentSnapshotParams struct {
	AssignmentID int64
	Progress     []int32
}

type InsertAssignmentTaskParams

type InsertAssignmentTaskParams struct {
	TaskType   int32
	Values     []int32
	ValueTypes []int32
}

type InsertEventSnapshotParams

type InsertEventSnapshotParams struct {
	EventID int32
	Health  int64
}

type InsertPlanetSnapshotParams

type InsertPlanetSnapshotParams struct {
	PlanetID           int32
	Health             int64
	CurrentOwner       string
	EventSnapshotID    *int64
	AttackingPlanetIds []int32
	RegenPerSecond     float64
	StatisticsID       int64
}

type InsertSnapshotParams

type InsertSnapshotParams struct {
	WarSnapshotID         int64
	AssignmentSnapshotIds []int64
	CampaignIds           []int32
	DispatchIds           []int32
	PlanetSnapshotIds     []int64
	StatisticsID          int64
}

type InsertSnapshotStatisticsParams

type InsertSnapshotStatisticsParams struct {
	MissionsWon     pgtype.Numeric
	MissionsLost    pgtype.Numeric
	MissionTime     pgtype.Numeric
	TerminidKills   pgtype.Numeric
	AutomatonKills  pgtype.Numeric
	IlluminateKills pgtype.Numeric
	BulletsFired    pgtype.Numeric
	BulletsHit      pgtype.Numeric
	TimePlayed      pgtype.Numeric
	Deaths          pgtype.Numeric
	Revives         pgtype.Numeric
	Friendlies      pgtype.Numeric
	PlayerCount     pgtype.Numeric
}

type InsertWarSnapshotParams

type InsertWarSnapshotParams struct {
	WarID            int32
	ImpactMultiplier float64
}

type MergeAssignmentParams

type MergeAssignmentParams struct {
	ID           int64
	Title        string
	Briefing     string
	Description  string
	Expiration   pgtype.Timestamp
	TaskIds      []int64
	RewardType   int32
	RewardAmount int32
}

type MergeBiomeParams

type MergeBiomeParams struct {
	Name        string
	Description string
}

type MergeCampaignParams

type MergeCampaignParams struct {
	ID    int32
	Type  int32
	Count int32
}

type MergeDispatchParams

type MergeDispatchParams struct {
	ID         int32
	CreateTime pgtype.Timestamp
	Type       int32
	Message    string
}

type MergeEventParams

type MergeEventParams struct {
	ID         int32
	CampaignID int32
	Type       int32
	Faction    string
	MaxHealth  int64
	StartTime  pgtype.Timestamp
	EndTime    pgtype.Timestamp
}

type MergeHazardParams

type MergeHazardParams struct {
	Name        string
	Description string
}

type MergePlanetParams

type MergePlanetParams struct {
	ID           int32
	Name         string
	Sector       string
	Position     []float64
	WaypointIds  []int32
	Disabled     bool
	BiomeName    string
	HazardNames  []string
	MaxHealth    int64
	InitialOwner string
}

type MergeWarParams

type MergeWarParams struct {
	ID        int32
	StartTime pgtype.Timestamp
	EndTime   pgtype.Timestamp
	Factions  []string
}

type Planet

type Planet struct {
	// The unique identifier ArrowHead assigned to this planet
	ID int32
	// The name of the planet, as shown in game
	Name string
	// The name of the sector the planet is in, as shown in game
	Sector string
	// The coordinates of this planet on the galactic war map in format [X, Y]
	Position []float64
	// List of indexes of all the planets to which this planet is connected
	WaypointIds []int32
	// Whether or not this planet is disabled, as assigned by ArrowHead
	Disabled bool
	// The biomes this planet has.
	BiomeName string
	// All hazardss that are applicable to this planet.
	HazardNames []string
	// The maximum health pool of this planet
	MaxHealth int64
	// The faction that originally owned the plane
	InitialOwner string
}

Represents information of a planet from the "WarInfo" endpoint returned by ArrowHead's API

type PlanetSnapshot

type PlanetSnapshot struct {
	// Auto-generated by sequence
	ID int64
	// ID of the planet this snapshot captures.
	PlanetID int32
	// The current health this planet has
	Health int64
	// The faction that currently controls the planet
	CurrentOwner string
	// Information on the active event ongoing on this planet, if one is active
	EventSnapshotID *int64
	// A list of Index integers that this planet is currently attacking.
	AttackingPlanetIds []int32
	// How much the planet regenerates per second if left alone
	RegenPerSecond float64
	// A set of statistics scoped to this planet.
	StatisticsID int64
}

Contains dynamic data about a planet currently part of this war

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) AssignmentExists

func (q *Queries) AssignmentExists(ctx context.Context, id int64) (bool, error)

func (*Queries) BiomeExists

func (q *Queries) BiomeExists(ctx context.Context, name string) (bool, error)

func (*Queries) CampaignExists

func (q *Queries) CampaignExists(ctx context.Context, id int32) (bool, error)

func (*Queries) DeleteAssignmentTasks

func (q *Queries) DeleteAssignmentTasks(ctx context.Context, ids []int64) error

func (*Queries) DispatchExists

func (q *Queries) DispatchExists(ctx context.Context, id int32) (bool, error)

func (*Queries) EventExists

func (q *Queries) EventExists(ctx context.Context, id int32) (bool, error)

func (*Queries) GetAssignment

func (q *Queries) GetAssignment(ctx context.Context, id int64) (int64, error)

func (*Queries) GetBiome

func (q *Queries) GetBiome(ctx context.Context, name string) (string, error)

func (*Queries) GetCampaign

func (q *Queries) GetCampaign(ctx context.Context, id int32) (int32, error)

func (*Queries) GetDispatch

func (q *Queries) GetDispatch(ctx context.Context, id int32) (int32, error)

func (*Queries) GetEvent

func (q *Queries) GetEvent(ctx context.Context, id int32) (int32, error)

func (*Queries) GetHazard

func (q *Queries) GetHazard(ctx context.Context, name string) (string, error)

func (*Queries) GetLatestSnapshot

func (q *Queries) GetLatestSnapshot(ctx context.Context) (Snapshot, error)

func (*Queries) GetPlanet

func (q *Queries) GetPlanet(ctx context.Context, id int32) (int32, error)

func (*Queries) GetWar

func (q *Queries) GetWar(ctx context.Context, id int32) (int32, error)

func (*Queries) HazardExists

func (q *Queries) HazardExists(ctx context.Context, name string) (bool, error)

func (*Queries) InsertAssignmentSnapshot

func (q *Queries) InsertAssignmentSnapshot(ctx context.Context, arg InsertAssignmentSnapshotParams) (int64, error)

func (*Queries) InsertAssignmentTask

func (q *Queries) InsertAssignmentTask(ctx context.Context, arg InsertAssignmentTaskParams) (int64, error)

func (*Queries) InsertEventSnapshot

func (q *Queries) InsertEventSnapshot(ctx context.Context, arg InsertEventSnapshotParams) (int64, error)

func (*Queries) InsertPlanetSnapshot

func (q *Queries) InsertPlanetSnapshot(ctx context.Context, arg InsertPlanetSnapshotParams) (int64, error)

func (*Queries) InsertSnapshot

func (q *Queries) InsertSnapshot(ctx context.Context, arg InsertSnapshotParams) (pgtype.Timestamp, error)

func (*Queries) InsertSnapshotStatistics

func (q *Queries) InsertSnapshotStatistics(ctx context.Context, arg InsertSnapshotStatisticsParams) (int64, error)

func (*Queries) InsertWarSnapshot

func (q *Queries) InsertWarSnapshot(ctx context.Context, arg InsertWarSnapshotParams) (int64, error)

func (*Queries) MergeAssignment

func (q *Queries) MergeAssignment(ctx context.Context, arg MergeAssignmentParams) (int64, error)

func (*Queries) MergeBiome

func (q *Queries) MergeBiome(ctx context.Context, arg MergeBiomeParams) (int64, error)

func (*Queries) MergeCampaign

func (q *Queries) MergeCampaign(ctx context.Context, arg MergeCampaignParams) (int64, error)

func (*Queries) MergeDispatch

func (q *Queries) MergeDispatch(ctx context.Context, arg MergeDispatchParams) (int64, error)

func (*Queries) MergeEvent

func (q *Queries) MergeEvent(ctx context.Context, arg MergeEventParams) (int64, error)

func (*Queries) MergeHazard

func (q *Queries) MergeHazard(ctx context.Context, arg MergeHazardParams) (int64, error)

func (*Queries) MergePlanet

func (q *Queries) MergePlanet(ctx context.Context, arg MergePlanetParams) (int64, error)

func (*Queries) MergeWar

func (q *Queries) MergeWar(ctx context.Context, arg MergeWarParams) (int64, error)

func (*Queries) PlanetExists

func (q *Queries) PlanetExists(ctx context.Context, id int32) (bool, error)

func (*Queries) WarExists

func (q *Queries) WarExists(ctx context.Context, id int32) (bool, error)

func (*Queries) WithTx

func (q *Queries) WithTx(tx pgx.Tx) *Queries

type Snapshot

type Snapshot struct {
	// The time the snapshot of the war was taken, auto-generated as current timestamp
	CreateTime pgtype.Timestamp
	// Dynamic data about current war
	WarSnapshotID int64
	// Snapshots for currently active assignments
	AssignmentSnapshotIds []int64
	// Currently active campaigns
	CampaignIds []int32
	// Currently active dispatches
	DispatchIds []int32
	// Dynamic data about planets at point of snapshot
	PlanetSnapshotIds []int64
	// Global statistics for the current war
	StatisticsID int64
}

Contains the dynamic data of any metrics changing over time.

type SnapshotStatistic

type SnapshotStatistic struct {
	// Auto-generated by sequence
	ID           int64
	MissionsWon  pgtype.Numeric
	MissionsLost pgtype.Numeric
	// The total amount of time spent planetside (in seconds)
	MissionTime     pgtype.Numeric
	TerminidKills   pgtype.Numeric
	AutomatonKills  pgtype.Numeric
	IlluminateKills pgtype.Numeric
	BulletsFired    pgtype.Numeric
	BulletsHit      pgtype.Numeric
	// The total amount of time played (including off-planet) in seconds
	TimePlayed pgtype.Numeric
	// The amount of casualties on the side of humanity
	Deaths pgtype.Numeric
	// The amount of revives(?)
	Revives pgtype.Numeric
	// The amount of friendly fire casualties
	Friendlies pgtype.Numeric
	// The total amount of players present (at the time of the snapshot)
	PlayerCount pgtype.Numeric
}

Contains statistics of missions, kills, success rate etc

type Table added in v0.0.3

type Table int
const (
	TableWars                Table = iota + 1 // Wars
	TableCampaigns                            // Campaigns
	TableEvents                               // Events
	TableBiomes                               // Biomes
	TableHazards                              // Hazards
	TablePlanets                              // Planets
	TableAssignmentTasks                      // Assignment Tasks
	TableAssignments                          // Assignments
	TableDispatches                           // Dispatches
	TableWarSnapshots                         // War Snapshots
	TableEventSnapshots                       // Event Snapshots
	TableAssignmentSnapshots                  // Assignment Snapshots
	TableSnapshotStatistics                   // Snapshot Statistics
	TablePlanetSnapshots                      // Planet Snapshots
	TableSnapshots                            // Snapshots
)

func (Table) String added in v0.0.3

func (i Table) String() string

type War

type War struct {
	ID int32
	// When this war was started
	StartTime pgtype.Timestamp
	// When this war will end (or has ended)
	EndTime pgtype.Timestamp
	// A list of factions currently involved in the war
	Factions []string
}

Represents the global information of the ongoing war

type WarSnapshot

type WarSnapshot struct {
	// Auto-generated by sequence
	ID    int64
	WarID int32
	// A fraction used to calculate the impact of a mission on the war effort
	ImpactMultiplier float64
}

Contains the dynamic data about a war.

Jump to

Keyboard shortcuts

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