Documentation
¶
Overview ¶
Package db handles interactions with the MongoDB instance and works as an abstraction layer
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PGTimestamp ¶ added in v0.0.2
PGTimestamp converts a `time.Time` to a `pgx`-compatible `pgtype.Timestamp`.
Types ¶
type Assignment ¶ added in v0.0.2
type Assignment struct {
gen.Assignment
Tasks []gen.AssignmentTask
}
Assignment implements EntityMerger
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is the abstraction layer for the MongoDB connector
func (*Client) Disconnect ¶
Disconnect disconnects from the MongoDB instance
type EntityMerger ¶ added in v0.0.2
type EntityMerger interface {
// Merge merges the implementing entity to the database. It should call `onMerge` when finished.
Merge(ctx context.Context, tx *gen.Queries, onMerge onMergeFunc) error
}
EntityMerger provide a means of merging an entity to the database.
type PlanetSnapshot ¶ added in v0.0.2
type PlanetSnapshot struct {
gen.PlanetSnapshot
Event *gen.EventSnapshot
Statistics gen.SnapshotStatistic
}
PlanetSnapshot wraps all snapshots relevant for a planet.
type Snapshot ¶ added in v0.0.2
type Snapshot struct {
gen.Snapshot
WarSnapshot gen.WarSnapshot
AssignmentSnapshots []gen.AssignmentSnapshot
PlanetSnapshots []PlanetSnapshot
Statistics gen.SnapshotStatistic
}
Snapshot implements EntityMerger
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Code generated by sqlc-gen-enum.
|
Code generated by sqlc-gen-enum. |
|
package main implements a custom `sqlc` generator.
|
package main implements a custom `sqlc` generator. |
|
Package stats provides utilities for collecting and printing statistics
|
Package stats provides utilities for collecting and printing statistics |
Click to show internal directories.
Click to hide internal directories.