Documentation
¶
Overview ¶
Code generated by sqlc-gen-enum. DO NOT EDIT.
Index ¶
- Variables
- type Assignment
- type AssignmentSnapshot
- type AssignmentTask
- type Biome
- type Campaign
- type DBTX
- type Dispatch
- type Event
- type EventSnapshot
- type Hazard
- type InsertAssignmentSnapshotParams
- type InsertAssignmentTaskParams
- type InsertEventSnapshotParams
- type InsertPlanetSnapshotParams
- type InsertSnapshotParams
- type InsertSnapshotStatisticsParams
- type InsertWarSnapshotParams
- type MergeAssignmentParams
- type MergeBiomeParams
- type MergeCampaignParams
- type MergeDispatchParams
- type MergeEventParams
- type MergeHazardParams
- type MergePlanetParams
- type MergeWarParams
- type Planet
- type PlanetSnapshot
- type Queries
- func (q *Queries) AssignmentExists(ctx context.Context, id int64) (bool, error)
- func (q *Queries) BiomeExists(ctx context.Context, name string) (bool, error)
- func (q *Queries) CampaignExists(ctx context.Context, id int32) (bool, error)
- func (q *Queries) DeleteAssignmentTasks(ctx context.Context, assignmentID int64) error
- func (q *Queries) DispatchExists(ctx context.Context, id int32) (bool, error)
- func (q *Queries) EventExists(ctx context.Context, id int32) (bool, error)
- func (q *Queries) GetAssignment(ctx context.Context, id int64) (int64, error)
- func (q *Queries) GetBiome(ctx context.Context, name string) (string, error)
- func (q *Queries) GetCampaign(ctx context.Context, id int32) (int32, error)
- func (q *Queries) GetDispatch(ctx context.Context, id int32) (int32, error)
- func (q *Queries) GetEvent(ctx context.Context, id int32) (int32, error)
- func (q *Queries) GetHazard(ctx context.Context, name string) (string, error)
- func (q *Queries) GetLatestSnapshot(ctx context.Context) (Snapshot, error)
- func (q *Queries) GetPlanet(ctx context.Context, id int32) (int32, error)
- func (q *Queries) GetWar(ctx context.Context, id int32) (int32, error)
- func (q *Queries) HazardExists(ctx context.Context, name string) (bool, error)
- func (q *Queries) InsertAssignmentSnapshot(ctx context.Context, arg InsertAssignmentSnapshotParams) (int64, error)
- func (q *Queries) InsertAssignmentTask(ctx context.Context, arg InsertAssignmentTaskParams) (int64, error)
- func (q *Queries) InsertEventSnapshot(ctx context.Context, arg InsertEventSnapshotParams) (int64, error)
- func (q *Queries) InsertPlanetSnapshot(ctx context.Context, arg InsertPlanetSnapshotParams) (int64, error)
- func (q *Queries) InsertSnapshot(ctx context.Context, arg InsertSnapshotParams) (pgtype.Timestamp, error)
- func (q *Queries) InsertSnapshotStatistics(ctx context.Context, arg InsertSnapshotStatisticsParams) (int64, error)
- func (q *Queries) InsertWarSnapshot(ctx context.Context, arg InsertWarSnapshotParams) (int64, error)
- func (q *Queries) MergeAssignment(ctx context.Context, arg MergeAssignmentParams) (int64, error)
- func (q *Queries) MergeBiome(ctx context.Context, arg MergeBiomeParams) (int64, error)
- func (q *Queries) MergeCampaign(ctx context.Context, arg MergeCampaignParams) (int64, error)
- func (q *Queries) MergeDispatch(ctx context.Context, arg MergeDispatchParams) (int64, error)
- func (q *Queries) MergeEvent(ctx context.Context, arg MergeEventParams) (int64, error)
- func (q *Queries) MergeHazard(ctx context.Context, arg MergeHazardParams) (int64, error)
- func (q *Queries) MergePlanet(ctx context.Context, arg MergePlanetParams) (int64, error)
- func (q *Queries) MergeWar(ctx context.Context, arg MergeWarParams) (int64, error)
- func (q *Queries) PlanetExists(ctx context.Context, id int32) (bool, error)
- func (q *Queries) WarExists(ctx context.Context, id int32) (bool, error)
- func (q *Queries) WithTx(tx pgx.Tx) *Queries
- type Snapshot
- type SnapshotStatistic
- type Table
- type War
- type WarSnapshot
Constants ¶
This section is empty.
Variables ¶
var AllTables = []Table{ TableWars, TableCampaigns, TableEvents, TableBiomes, TableHazards, TablePlanets, TableAssignmentTasks, TableAssignments, TableDispatches, TableWarSnapshots, TableEventSnapshots, TableAssignmentSnapshots, TableSnapshotStatistics, TablePlanetSnapshots, TableSnapshots, }
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 pgtype.Numeric
}
Represents an assignment given by Super Earth to the community. This is also known as "Major Order"s in the game
type AssignmentSnapshot ¶
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 []pgtype.Numeric
// A list of numbers, purpose unknown
ValueTypes []pgtype.Numeric
}
Represents a task in an Assignment that needs to be completed to finish the assignment
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 pgtype.Numeric
}
Represents an ongoing campaign on a planet
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 ¶
Contains dynamic data about a currently-ongoing event
type InsertSnapshotParams ¶
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 MergeAssignmentParams ¶
type MergeBiomeParams ¶
type MergeCampaignParams ¶
type MergeDispatchParams ¶
type MergeEventParams ¶
type MergeHazardParams ¶
type MergePlanetParams ¶
type MergeWarParams ¶
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 (*Queries) AssignmentExists ¶
func (*Queries) BiomeExists ¶
func (*Queries) CampaignExists ¶
func (*Queries) DeleteAssignmentTasks ¶
func (*Queries) DispatchExists ¶
func (*Queries) EventExists ¶
func (*Queries) GetAssignment ¶
func (*Queries) GetCampaign ¶
func (*Queries) GetDispatch ¶
func (*Queries) GetLatestSnapshot ¶
func (*Queries) HazardExists ¶
func (*Queries) InsertAssignmentSnapshot ¶
func (*Queries) InsertAssignmentTask ¶
func (*Queries) InsertEventSnapshot ¶
func (*Queries) InsertPlanetSnapshot ¶
func (*Queries) InsertSnapshot ¶
func (*Queries) InsertSnapshotStatistics ¶
func (*Queries) InsertWarSnapshot ¶
func (*Queries) MergeAssignment ¶
func (*Queries) MergeBiome ¶
func (*Queries) MergeCampaign ¶
func (*Queries) MergeDispatch ¶
func (*Queries) MergeEvent ¶
func (*Queries) MergeHazard ¶
func (*Queries) MergePlanet ¶
func (*Queries) PlanetExists ¶
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 )
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.