Documentation
¶
Index ¶
- type AddToPlayerInventoryParams
- type CheckNodePositionParams
- type Chunk
- type CreateChunkParams
- type CreateHarvestLogParams
- type CreateNodeParams
- type CreatePlayerParams
- type CreatePlayerSessionParams
- type DBTX
- type DeactivateNodeParams
- type GetChunkNodeCountParams
- type GetChunkNodesParams
- type GetChunkOccupiedPositionsParams
- type GetChunkOccupiedPositionsRow
- type GetChunkParams
- type GetDailyNodeCountParams
- type GetNodesToRespawnParams
- type GetNodesToRespawnRow
- type GetPlayerDailyHarvestParams
- type GetPlayerInventoryResourceParams
- type GetPlayersInChunkParams
- type GetPlayersWithStatsRow
- type GetRandomNodeCountParams
- type GetRespawnDelayParams
- type GetTopPlayersByPlaytimeRow
- type GetTopPlayersByResourcesRow
- type HarvestLog
- type LoggingQueries
- func (lq *LoggingQueries) CheckNodePosition(ctx context.Context, arg CheckNodePositionParams) (int64, error)
- func (lq *LoggingQueries) CreateChunk(ctx context.Context, arg CreateChunkParams) error
- func (lq *LoggingQueries) CreateHarvestLog(ctx context.Context, arg CreateHarvestLogParams) error
- func (lq *LoggingQueries) CreateNode(ctx context.Context, arg CreateNodeParams) (int64, error)
- func (lq *LoggingQueries) DeactivateNode(ctx context.Context, arg DeactivateNodeParams) error
- func (lq *LoggingQueries) GetChunkNodeCount(ctx context.Context, arg GetChunkNodeCountParams) (int64, error)
- func (lq *LoggingQueries) GetChunkNodes(ctx context.Context, arg GetChunkNodesParams) ([]ResourceNode, error)
- func (lq *LoggingQueries) GetChunkOccupiedPositions(ctx context.Context, arg GetChunkOccupiedPositionsParams) ([]GetChunkOccupiedPositionsRow, error)
- func (lq *LoggingQueries) GetNode(ctx context.Context, nodeID int64) (ResourceNode, error)
- func (lq *LoggingQueries) GetNodesToRespawn(ctx context.Context, arg GetNodesToRespawnParams) ([]GetNodesToRespawnRow, error)
- func (lq *LoggingQueries) GetPlayerDailyHarvest(ctx context.Context, arg GetPlayerDailyHarvestParams) (int64, error)
- func (lq *LoggingQueries) GetRespawnDelay(ctx context.Context, arg GetRespawnDelayParams) (sql.NullInt64, error)
- func (lq *LoggingQueries) GetSpawnTemplates(ctx context.Context) ([]NodeSpawnTemplate, error)
- func (lq *LoggingQueries) GetWorldConfig(ctx context.Context, configKey string) (string, error)
- func (lq *LoggingQueries) ReactivateNode(ctx context.Context, arg ReactivateNodeParams) error
- func (lq *LoggingQueries) RegenerateNodeYield(ctx context.Context) error
- func (lq *LoggingQueries) SetWorldConfig(ctx context.Context, arg SetWorldConfigParams) error
- func (lq *LoggingQueries) UpdateNodeYield(ctx context.Context, arg UpdateNodeYieldParams) error
- func (lq *LoggingQueries) WithTx(tx *sql.Tx) *LoggingQueries
- type NodeSpawnTemplate
- type Player
- type PlayerInventory
- type PlayerSession
- type PlayerStat
- type PlayerValidation
- type Querier
- type Queries
- func (q *Queries) AddToPlayerInventory(ctx context.Context, arg AddToPlayerInventoryParams) error
- func (q *Queries) CheckNodePosition(ctx context.Context, arg CheckNodePositionParams) (int64, error)
- func (q *Queries) ClearPlayerInventory(ctx context.Context, playerID int64) error
- func (q *Queries) Close() error
- func (q *Queries) CreateChunk(ctx context.Context, arg CreateChunkParams) error
- func (q *Queries) CreateHarvestLog(ctx context.Context, arg CreateHarvestLogParams) error
- func (q *Queries) CreateNode(ctx context.Context, arg CreateNodeParams) (int64, error)
- func (q *Queries) CreatePlayer(ctx context.Context, arg CreatePlayerParams) (Player, error)
- func (q *Queries) CreatePlayerSession(ctx context.Context, arg CreatePlayerSessionParams) (PlayerSession, error)
- func (q *Queries) CreatePlayerStats(ctx context.Context, playerID int64) (PlayerStat, error)
- func (q *Queries) DeactivateNode(ctx context.Context, arg DeactivateNodeParams) error
- func (q *Queries) DeleteAllPlayerSessions(ctx context.Context, playerID int64) error
- func (q *Queries) DeleteExpiredSessions(ctx context.Context) error
- func (q *Queries) DeletePlayer(ctx context.Context, playerID int64) error
- func (q *Queries) DeletePlayerSession(ctx context.Context, sessionToken string) error
- func (q *Queries) GetChunk(ctx context.Context, arg GetChunkParams) (Chunk, error)
- func (q *Queries) GetChunkNodeCount(ctx context.Context, arg GetChunkNodeCountParams) (int64, error)
- func (q *Queries) GetChunkNodes(ctx context.Context, arg GetChunkNodesParams) ([]ResourceNode, error)
- func (q *Queries) GetChunkOccupiedPositions(ctx context.Context, arg GetChunkOccupiedPositionsParams) ([]GetChunkOccupiedPositionsRow, error)
- func (q *Queries) GetDailyNodeCount(ctx context.Context, arg GetDailyNodeCountParams) (int64, error)
- func (q *Queries) GetNode(ctx context.Context, nodeID int64) (ResourceNode, error)
- func (q *Queries) GetNodesToRespawn(ctx context.Context, arg GetNodesToRespawnParams) ([]GetNodesToRespawnRow, error)
- func (q *Queries) GetOnlinePlayers(ctx context.Context) ([]Player, error)
- func (q *Queries) GetPlayerActiveSessions(ctx context.Context, playerID int64) ([]PlayerSession, error)
- func (q *Queries) GetPlayerByEmail(ctx context.Context, email sql.NullString) (Player, error)
- func (q *Queries) GetPlayerByID(ctx context.Context, playerID int64) (Player, error)
- func (q *Queries) GetPlayerByUsername(ctx context.Context, username string) (Player, error)
- func (q *Queries) GetPlayerDailyHarvest(ctx context.Context, arg GetPlayerDailyHarvestParams) (int64, error)
- func (q *Queries) GetPlayerInventory(ctx context.Context, playerID int64) ([]PlayerInventory, error)
- func (q *Queries) GetPlayerInventoryResource(ctx context.Context, arg GetPlayerInventoryResourceParams) (PlayerInventory, error)
- func (q *Queries) GetPlayerSession(ctx context.Context, sessionToken string) (PlayerSession, error)
- func (q *Queries) GetPlayerStats(ctx context.Context, playerID int64) (PlayerStat, error)
- func (q *Queries) GetPlayersInChunk(ctx context.Context, arg GetPlayersInChunkParams) ([]Player, error)
- func (q *Queries) GetPlayersWithStats(ctx context.Context) ([]GetPlayersWithStatsRow, error)
- func (q *Queries) GetRandomNodeCount(ctx context.Context, arg GetRandomNodeCountParams) (int64, error)
- func (q *Queries) GetRespawnDelay(ctx context.Context, arg GetRespawnDelayParams) (sql.NullInt64, error)
- func (q *Queries) GetSpawnTemplates(ctx context.Context) ([]NodeSpawnTemplate, error)
- func (q *Queries) GetTopPlayersByPlaytime(ctx context.Context, limit int64) ([]GetTopPlayersByPlaytimeRow, error)
- func (q *Queries) GetTopPlayersByResources(ctx context.Context, limit int64) ([]GetTopPlayersByResourcesRow, error)
- func (q *Queries) GetTotalResourcesInInventory(ctx context.Context, playerID int64) (interface{}, error)
- func (q *Queries) GetWorldConfig(ctx context.Context, configKey string) (string, error)
- func (q *Queries) IncrementPlayerSessions(ctx context.Context, playerID int64) error
- func (q *Queries) ReactivateNode(ctx context.Context, arg ReactivateNodeParams) error
- func (q *Queries) RegenerateNodeYield(ctx context.Context) error
- func (q *Queries) RemoveFromPlayerInventory(ctx context.Context, arg RemoveFromPlayerInventoryParams) error
- func (q *Queries) SetPlayerInventoryQuantity(ctx context.Context, arg SetPlayerInventoryQuantityParams) error
- func (q *Queries) SetPlayerOffline(ctx context.Context, playerID int64) error
- func (q *Queries) SetPlayerOnline(ctx context.Context, playerID int64) error
- func (q *Queries) SetWorldConfig(ctx context.Context, arg SetWorldConfigParams) error
- func (q *Queries) UpdateChunkModified(ctx context.Context, arg UpdateChunkModifiedParams) error
- func (q *Queries) UpdateNodeYield(ctx context.Context, arg UpdateNodeYieldParams) error
- func (q *Queries) UpdatePlayerEmail(ctx context.Context, arg UpdatePlayerEmailParams) error
- func (q *Queries) UpdatePlayerPassword(ctx context.Context, arg UpdatePlayerPasswordParams) error
- func (q *Queries) UpdatePlayerPlaytime(ctx context.Context, arg UpdatePlayerPlaytimeParams) error
- func (q *Queries) UpdatePlayerPosition(ctx context.Context, arg UpdatePlayerPositionParams) error
- func (q *Queries) UpdatePlayerSessionActivity(ctx context.Context, sessionToken string) error
- func (q *Queries) UpdatePlayerStats(ctx context.Context, arg UpdatePlayerStatsParams) error
- func (q *Queries) WithTx(tx *sql.Tx) *Queries
- type ReactivateNodeParams
- type RemoveFromPlayerInventoryParams
- type ResourceNode
- type SetPlayerInventoryQuantityParams
- type SetWorldConfigParams
- type UpdateChunkModifiedParams
- type UpdateNodeYieldParams
- type UpdatePlayerEmailParams
- type UpdatePlayerPasswordParams
- type UpdatePlayerPlaytimeParams
- type UpdatePlayerPositionParams
- type UpdatePlayerStatsParams
- type WorldConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CheckNodePositionParams ¶
type CreateChunkParams ¶
type CreateHarvestLogParams ¶
type CreateNodeParams ¶
type CreateNodeParams struct {
ChunkX int64 `json:"chunk_x"`
ChunkZ int64 `json:"chunk_z"`
LocalX int64 `json:"local_x"`
LocalZ int64 `json:"local_z"`
NodeType int64 `json:"node_type"`
NodeSubtype sql.NullInt64 `json:"node_subtype"`
MaxYield int64 `json:"max_yield"`
CurrentYield int64 `json:"current_yield"`
RegenerationRate sql.NullInt64 `json:"regeneration_rate"`
SpawnType int64 `json:"spawn_type"`
}
type CreatePlayerParams ¶
type CreatePlayerParams struct {
Username string `json:"username"`
PasswordHash string `json:"password_hash"`
Salt string `json:"salt"`
Email sql.NullString `json:"email"`
}
type CreatePlayerSessionParams ¶
type CreatePlayerSessionParams struct {
PlayerID int64 `json:"player_id"`
SessionToken string `json:"session_token"`
IpAddress sql.NullString `json:"ip_address"`
UserAgent sql.NullString `json:"user_agent"`
ExpiresAt time.Time `json:"expires_at"`
}
type DeactivateNodeParams ¶
type GetChunkNodeCountParams ¶
type GetChunkNodesParams ¶
type GetChunkParams ¶
type GetDailyNodeCountParams ¶
type GetNodesToRespawnParams ¶
type GetNodesToRespawnRow ¶
type GetPlayersInChunkParams ¶
type GetPlayersWithStatsRow ¶
type GetPlayersWithStatsRow struct {
PlayerID int64 `json:"player_id"`
Username string `json:"username"`
PasswordHash string `json:"password_hash"`
Salt string `json:"salt"`
Email sql.NullString `json:"email"`
WorldX sql.NullFloat64 `json:"world_x"`
WorldY sql.NullFloat64 `json:"world_y"`
WorldZ sql.NullFloat64 `json:"world_z"`
CurrentChunkX sql.NullInt64 `json:"current_chunk_x"`
CurrentChunkZ sql.NullInt64 `json:"current_chunk_z"`
IsOnline sql.NullInt64 `json:"is_online"`
LastLogin sql.NullTime `json:"last_login"`
LastLogout sql.NullTime `json:"last_logout"`
CreatedAt sql.NullTime `json:"created_at"`
UpdatedAt sql.NullTime `json:"updated_at"`
TotalResourcesHarvested int64 `json:"total_resources_harvested"`
TotalHarvestSessions int64 `json:"total_harvest_sessions"`
SessionsCount int64 `json:"sessions_count"`
TotalPlaytimeMinutes int64 `json:"total_playtime_minutes"`
}
type GetRespawnDelayParams ¶
type HarvestLog ¶
type HarvestLog struct {
LogID int64 `json:"log_id"`
NodeID int64 `json:"node_id"`
PlayerID int64 `json:"player_id"`
AmountHarvested int64 `json:"amount_harvested"`
HarvestedAt sql.NullTime `json:"harvested_at"`
NodeYieldBefore int64 `json:"node_yield_before"`
NodeYieldAfter int64 `json:"node_yield_after"`
}
type LoggingQueries ¶
type LoggingQueries struct {
*Queries
}
LoggingQueries wraps the generated Queries struct to add debug logging
func NewLoggingQueries ¶
func NewLoggingQueries(db DBTX) *LoggingQueries
NewLoggingQueries creates a new LoggingQueries instance
func (*LoggingQueries) CheckNodePosition ¶
func (lq *LoggingQueries) CheckNodePosition(ctx context.Context, arg CheckNodePositionParams) (int64, error)
CheckNodePosition with logging
func (*LoggingQueries) CreateChunk ¶
func (lq *LoggingQueries) CreateChunk(ctx context.Context, arg CreateChunkParams) error
CreateChunk with logging
func (*LoggingQueries) CreateHarvestLog ¶
func (lq *LoggingQueries) CreateHarvestLog(ctx context.Context, arg CreateHarvestLogParams) error
CreateHarvestLog with logging
func (*LoggingQueries) CreateNode ¶
func (lq *LoggingQueries) CreateNode(ctx context.Context, arg CreateNodeParams) (int64, error)
CreateNode with logging
func (*LoggingQueries) DeactivateNode ¶
func (lq *LoggingQueries) DeactivateNode(ctx context.Context, arg DeactivateNodeParams) error
DeactivateNode with logging
func (*LoggingQueries) GetChunkNodeCount ¶
func (lq *LoggingQueries) GetChunkNodeCount(ctx context.Context, arg GetChunkNodeCountParams) (int64, error)
GetChunkNodeCount with logging
func (*LoggingQueries) GetChunkNodes ¶
func (lq *LoggingQueries) GetChunkNodes(ctx context.Context, arg GetChunkNodesParams) ([]ResourceNode, error)
GetChunkNodes with logging
func (*LoggingQueries) GetChunkOccupiedPositions ¶
func (lq *LoggingQueries) GetChunkOccupiedPositions(ctx context.Context, arg GetChunkOccupiedPositionsParams) ([]GetChunkOccupiedPositionsRow, error)
GetChunkOccupiedPositions with logging
func (*LoggingQueries) GetNode ¶
func (lq *LoggingQueries) GetNode(ctx context.Context, nodeID int64) (ResourceNode, error)
GetNode with logging
func (*LoggingQueries) GetNodesToRespawn ¶
func (lq *LoggingQueries) GetNodesToRespawn(ctx context.Context, arg GetNodesToRespawnParams) ([]GetNodesToRespawnRow, error)
GetNodesToRespawn with logging
func (*LoggingQueries) GetPlayerDailyHarvest ¶
func (lq *LoggingQueries) GetPlayerDailyHarvest(ctx context.Context, arg GetPlayerDailyHarvestParams) (int64, error)
GetPlayerDailyHarvest with logging
func (*LoggingQueries) GetRespawnDelay ¶
func (lq *LoggingQueries) GetRespawnDelay(ctx context.Context, arg GetRespawnDelayParams) (sql.NullInt64, error)
GetRespawnDelay with logging
func (*LoggingQueries) GetSpawnTemplates ¶
func (lq *LoggingQueries) GetSpawnTemplates(ctx context.Context) ([]NodeSpawnTemplate, error)
GetSpawnTemplates with logging
func (*LoggingQueries) GetWorldConfig ¶
GetWorldConfig with logging
func (*LoggingQueries) ReactivateNode ¶
func (lq *LoggingQueries) ReactivateNode(ctx context.Context, arg ReactivateNodeParams) error
ReactivateNode with logging
func (*LoggingQueries) RegenerateNodeYield ¶
func (lq *LoggingQueries) RegenerateNodeYield(ctx context.Context) error
RegenerateNodeYield with logging
func (*LoggingQueries) SetWorldConfig ¶
func (lq *LoggingQueries) SetWorldConfig(ctx context.Context, arg SetWorldConfigParams) error
SetWorldConfig with logging
func (*LoggingQueries) UpdateNodeYield ¶
func (lq *LoggingQueries) UpdateNodeYield(ctx context.Context, arg UpdateNodeYieldParams) error
UpdateNodeYield with logging
func (*LoggingQueries) WithTx ¶
func (lq *LoggingQueries) WithTx(tx *sql.Tx) *LoggingQueries
WithTx creates a new LoggingQueries with a transaction
type NodeSpawnTemplate ¶
type NodeSpawnTemplate struct {
TemplateID int64 `json:"template_id"`
NodeType int64 `json:"node_type"`
NodeSubtype sql.NullInt64 `json:"node_subtype"`
SpawnType int64 `json:"spawn_type"`
MinYield int64 `json:"min_yield"`
MaxYield int64 `json:"max_yield"`
RegenerationRate sql.NullInt64 `json:"regeneration_rate"`
RespawnDelayHours sql.NullInt64 `json:"respawn_delay_hours"`
SpawnWeight sql.NullInt64 `json:"spawn_weight"`
BiomeRestriction sql.NullString `json:"biome_restriction"`
ClusterSizeMin sql.NullInt64 `json:"cluster_size_min"`
ClusterSizeMax sql.NullInt64 `json:"cluster_size_max"`
ClusterSpreadMin sql.NullInt64 `json:"cluster_spread_min"`
ClusterSpreadMax sql.NullInt64 `json:"cluster_spread_max"`
ClustersPerChunk sql.NullInt64 `json:"clusters_per_chunk"`
NoiseScale sql.NullFloat64 `json:"noise_scale"`
NoiseThreshold sql.NullFloat64 `json:"noise_threshold"`
NoiseOctaves sql.NullInt64 `json:"noise_octaves"`
NoisePersistence sql.NullFloat64 `json:"noise_persistence"`
}
type Player ¶
type Player struct {
PlayerID int64 `json:"player_id"`
Username string `json:"username"`
PasswordHash string `json:"password_hash"`
Salt string `json:"salt"`
Email sql.NullString `json:"email"`
WorldX sql.NullFloat64 `json:"world_x"`
WorldY sql.NullFloat64 `json:"world_y"`
WorldZ sql.NullFloat64 `json:"world_z"`
CurrentChunkX sql.NullInt64 `json:"current_chunk_x"`
CurrentChunkZ sql.NullInt64 `json:"current_chunk_z"`
IsOnline sql.NullInt64 `json:"is_online"`
LastLogin sql.NullTime `json:"last_login"`
LastLogout sql.NullTime `json:"last_logout"`
CreatedAt sql.NullTime `json:"created_at"`
UpdatedAt sql.NullTime `json:"updated_at"`
}
type PlayerInventory ¶
type PlayerInventory struct {
InventoryID int64 `json:"inventory_id"`
PlayerID int64 `json:"player_id"`
ResourceType int64 `json:"resource_type"`
ResourceSubtype sql.NullInt64 `json:"resource_subtype"`
Quantity sql.NullInt64 `json:"quantity"`
FirstObtained sql.NullTime `json:"first_obtained"`
LastUpdated sql.NullTime `json:"last_updated"`
}
type PlayerSession ¶
type PlayerSession struct {
SessionID int64 `json:"session_id"`
PlayerID int64 `json:"player_id"`
SessionToken string `json:"session_token"`
IpAddress sql.NullString `json:"ip_address"`
UserAgent sql.NullString `json:"user_agent"`
CreatedAt sql.NullTime `json:"created_at"`
ExpiresAt time.Time `json:"expires_at"`
LastActivity sql.NullTime `json:"last_activity"`
}
type PlayerStat ¶
type PlayerStat struct {
StatID int64 `json:"stat_id"`
PlayerID int64 `json:"player_id"`
TotalResourcesHarvested sql.NullInt64 `json:"total_resources_harvested"`
TotalHarvestSessions sql.NullInt64 `json:"total_harvest_sessions"`
IronOreHarvested sql.NullInt64 `json:"iron_ore_harvested"`
GoldOreHarvested sql.NullInt64 `json:"gold_ore_harvested"`
WoodHarvested sql.NullInt64 `json:"wood_harvested"`
StoneHarvested sql.NullInt64 `json:"stone_harvested"`
UniqueNodesDiscovered sql.NullInt64 `json:"unique_nodes_discovered"`
TotalNodesHarvested sql.NullInt64 `json:"total_nodes_harvested"`
TotalPlaytimeMinutes sql.NullInt64 `json:"total_playtime_minutes"`
SessionsCount sql.NullInt64 `json:"sessions_count"`
FirstHarvest sql.NullTime `json:"first_harvest"`
LastHarvest sql.NullTime `json:"last_harvest"`
StatsUpdated sql.NullTime `json:"stats_updated"`
}
type PlayerValidation ¶
type Querier ¶
type Querier interface {
AddToPlayerInventory(ctx context.Context, arg AddToPlayerInventoryParams) error
CheckNodePosition(ctx context.Context, arg CheckNodePositionParams) (int64, error)
ClearPlayerInventory(ctx context.Context, playerID int64) error
CreateChunk(ctx context.Context, arg CreateChunkParams) error
CreateHarvestLog(ctx context.Context, arg CreateHarvestLogParams) error
CreateNode(ctx context.Context, arg CreateNodeParams) (int64, error)
CreatePlayer(ctx context.Context, arg CreatePlayerParams) (Player, error)
CreatePlayerSession(ctx context.Context, arg CreatePlayerSessionParams) (PlayerSession, error)
CreatePlayerStats(ctx context.Context, playerID int64) (PlayerStat, error)
DeactivateNode(ctx context.Context, arg DeactivateNodeParams) error
DeleteAllPlayerSessions(ctx context.Context, playerID int64) error
DeleteExpiredSessions(ctx context.Context) error
DeletePlayer(ctx context.Context, playerID int64) error
DeletePlayerSession(ctx context.Context, sessionToken string) error
GetChunk(ctx context.Context, arg GetChunkParams) (Chunk, error)
GetChunkNodeCount(ctx context.Context, arg GetChunkNodeCountParams) (int64, error)
GetChunkNodes(ctx context.Context, arg GetChunkNodesParams) ([]ResourceNode, error)
GetChunkOccupiedPositions(ctx context.Context, arg GetChunkOccupiedPositionsParams) ([]GetChunkOccupiedPositionsRow, error)
GetDailyNodeCount(ctx context.Context, arg GetDailyNodeCountParams) (int64, error)
GetNode(ctx context.Context, nodeID int64) (ResourceNode, error)
GetNodesToRespawn(ctx context.Context, arg GetNodesToRespawnParams) ([]GetNodesToRespawnRow, error)
GetOnlinePlayers(ctx context.Context) ([]Player, error)
GetPlayerActiveSessions(ctx context.Context, playerID int64) ([]PlayerSession, error)
GetPlayerByEmail(ctx context.Context, email sql.NullString) (Player, error)
GetPlayerByID(ctx context.Context, playerID int64) (Player, error)
GetPlayerByUsername(ctx context.Context, username string) (Player, error)
GetPlayerDailyHarvest(ctx context.Context, arg GetPlayerDailyHarvestParams) (int64, error)
GetPlayerInventory(ctx context.Context, playerID int64) ([]PlayerInventory, error)
GetPlayerInventoryResource(ctx context.Context, arg GetPlayerInventoryResourceParams) (PlayerInventory, error)
GetPlayerSession(ctx context.Context, sessionToken string) (PlayerSession, error)
GetPlayerStats(ctx context.Context, playerID int64) (PlayerStat, error)
GetPlayersInChunk(ctx context.Context, arg GetPlayersInChunkParams) ([]Player, error)
GetPlayersWithStats(ctx context.Context) ([]GetPlayersWithStatsRow, error)
GetRandomNodeCount(ctx context.Context, arg GetRandomNodeCountParams) (int64, error)
GetRespawnDelay(ctx context.Context, arg GetRespawnDelayParams) (sql.NullInt64, error)
GetSpawnTemplates(ctx context.Context) ([]NodeSpawnTemplate, error)
GetTopPlayersByPlaytime(ctx context.Context, limit int64) ([]GetTopPlayersByPlaytimeRow, error)
GetTopPlayersByResources(ctx context.Context, limit int64) ([]GetTopPlayersByResourcesRow, error)
GetTotalResourcesInInventory(ctx context.Context, playerID int64) (interface{}, error)
GetWorldConfig(ctx context.Context, configKey string) (string, error)
IncrementPlayerSessions(ctx context.Context, playerID int64) error
ReactivateNode(ctx context.Context, arg ReactivateNodeParams) error
RegenerateNodeYield(ctx context.Context) error
RemoveFromPlayerInventory(ctx context.Context, arg RemoveFromPlayerInventoryParams) error
SetPlayerInventoryQuantity(ctx context.Context, arg SetPlayerInventoryQuantityParams) error
SetPlayerOffline(ctx context.Context, playerID int64) error
SetPlayerOnline(ctx context.Context, playerID int64) error
SetWorldConfig(ctx context.Context, arg SetWorldConfigParams) error
UpdateChunkModified(ctx context.Context, arg UpdateChunkModifiedParams) error
UpdateNodeYield(ctx context.Context, arg UpdateNodeYieldParams) error
UpdatePlayerEmail(ctx context.Context, arg UpdatePlayerEmailParams) error
UpdatePlayerPassword(ctx context.Context, arg UpdatePlayerPasswordParams) error
UpdatePlayerPlaytime(ctx context.Context, arg UpdatePlayerPlaytimeParams) error
UpdatePlayerPosition(ctx context.Context, arg UpdatePlayerPositionParams) error
UpdatePlayerSessionActivity(ctx context.Context, sessionToken string) error
UpdatePlayerStats(ctx context.Context, arg UpdatePlayerStatsParams) error
}
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) AddToPlayerInventory ¶
func (q *Queries) AddToPlayerInventory(ctx context.Context, arg AddToPlayerInventoryParams) error
func (*Queries) CheckNodePosition ¶
func (*Queries) ClearPlayerInventory ¶
func (*Queries) CreateChunk ¶
func (q *Queries) CreateChunk(ctx context.Context, arg CreateChunkParams) error
func (*Queries) CreateHarvestLog ¶
func (q *Queries) CreateHarvestLog(ctx context.Context, arg CreateHarvestLogParams) error
func (*Queries) CreateNode ¶
func (*Queries) CreatePlayer ¶
func (*Queries) CreatePlayerSession ¶
func (q *Queries) CreatePlayerSession(ctx context.Context, arg CreatePlayerSessionParams) (PlayerSession, error)
func (*Queries) CreatePlayerStats ¶
func (*Queries) DeactivateNode ¶
func (q *Queries) DeactivateNode(ctx context.Context, arg DeactivateNodeParams) error
func (*Queries) DeleteAllPlayerSessions ¶
func (*Queries) DeleteExpiredSessions ¶
func (*Queries) DeletePlayer ¶
func (*Queries) DeletePlayerSession ¶
func (*Queries) GetChunkNodeCount ¶
func (*Queries) GetChunkNodes ¶
func (q *Queries) GetChunkNodes(ctx context.Context, arg GetChunkNodesParams) ([]ResourceNode, error)
func (*Queries) GetChunkOccupiedPositions ¶
func (q *Queries) GetChunkOccupiedPositions(ctx context.Context, arg GetChunkOccupiedPositionsParams) ([]GetChunkOccupiedPositionsRow, error)
func (*Queries) GetDailyNodeCount ¶
func (*Queries) GetNodesToRespawn ¶
func (q *Queries) GetNodesToRespawn(ctx context.Context, arg GetNodesToRespawnParams) ([]GetNodesToRespawnRow, error)
func (*Queries) GetOnlinePlayers ¶
func (*Queries) GetPlayerActiveSessions ¶
func (*Queries) GetPlayerByEmail ¶
func (*Queries) GetPlayerByID ¶
func (*Queries) GetPlayerByUsername ¶
func (*Queries) GetPlayerDailyHarvest ¶
func (*Queries) GetPlayerInventory ¶
func (*Queries) GetPlayerInventoryResource ¶
func (q *Queries) GetPlayerInventoryResource(ctx context.Context, arg GetPlayerInventoryResourceParams) (PlayerInventory, error)
func (*Queries) GetPlayerSession ¶
func (*Queries) GetPlayerStats ¶
func (*Queries) GetPlayersInChunk ¶
func (*Queries) GetPlayersWithStats ¶
func (q *Queries) GetPlayersWithStats(ctx context.Context) ([]GetPlayersWithStatsRow, error)
func (*Queries) GetRandomNodeCount ¶
func (*Queries) GetRespawnDelay ¶
func (*Queries) GetSpawnTemplates ¶
func (q *Queries) GetSpawnTemplates(ctx context.Context) ([]NodeSpawnTemplate, error)
func (*Queries) GetTopPlayersByPlaytime ¶
func (*Queries) GetTopPlayersByResources ¶
func (*Queries) GetTotalResourcesInInventory ¶
func (*Queries) GetWorldConfig ¶
func (*Queries) IncrementPlayerSessions ¶
func (*Queries) ReactivateNode ¶
func (q *Queries) ReactivateNode(ctx context.Context, arg ReactivateNodeParams) error
func (*Queries) RegenerateNodeYield ¶
func (*Queries) RemoveFromPlayerInventory ¶
func (q *Queries) RemoveFromPlayerInventory(ctx context.Context, arg RemoveFromPlayerInventoryParams) error
func (*Queries) SetPlayerInventoryQuantity ¶
func (q *Queries) SetPlayerInventoryQuantity(ctx context.Context, arg SetPlayerInventoryQuantityParams) error
func (*Queries) SetPlayerOffline ¶
func (*Queries) SetPlayerOnline ¶
func (*Queries) SetWorldConfig ¶
func (q *Queries) SetWorldConfig(ctx context.Context, arg SetWorldConfigParams) error
func (*Queries) UpdateChunkModified ¶
func (q *Queries) UpdateChunkModified(ctx context.Context, arg UpdateChunkModifiedParams) error
func (*Queries) UpdateNodeYield ¶
func (q *Queries) UpdateNodeYield(ctx context.Context, arg UpdateNodeYieldParams) error
func (*Queries) UpdatePlayerEmail ¶
func (q *Queries) UpdatePlayerEmail(ctx context.Context, arg UpdatePlayerEmailParams) error
func (*Queries) UpdatePlayerPassword ¶
func (q *Queries) UpdatePlayerPassword(ctx context.Context, arg UpdatePlayerPasswordParams) error
func (*Queries) UpdatePlayerPlaytime ¶
func (q *Queries) UpdatePlayerPlaytime(ctx context.Context, arg UpdatePlayerPlaytimeParams) error
func (*Queries) UpdatePlayerPosition ¶
func (q *Queries) UpdatePlayerPosition(ctx context.Context, arg UpdatePlayerPositionParams) error
func (*Queries) UpdatePlayerSessionActivity ¶
func (*Queries) UpdatePlayerStats ¶
func (q *Queries) UpdatePlayerStats(ctx context.Context, arg UpdatePlayerStatsParams) error
type ReactivateNodeParams ¶
type ResourceNode ¶
type ResourceNode struct {
NodeID int64 `json:"node_id"`
ChunkX int64 `json:"chunk_x"`
ChunkZ int64 `json:"chunk_z"`
LocalX int64 `json:"local_x"`
LocalZ int64 `json:"local_z"`
NodeType int64 `json:"node_type"`
NodeSubtype sql.NullInt64 `json:"node_subtype"`
MaxYield int64 `json:"max_yield"`
CurrentYield int64 `json:"current_yield"`
RegenerationRate sql.NullInt64 `json:"regeneration_rate"`
SpawnedAt sql.NullTime `json:"spawned_at"`
LastHarvest sql.NullTime `json:"last_harvest"`
RespawnTimer sql.NullTime `json:"respawn_timer"`
SpawnType int64 `json:"spawn_type"`
IsActive sql.NullInt64 `json:"is_active"`
}
type SetWorldConfigParams ¶
type UpdateNodeYieldParams ¶
type UpdatePlayerEmailParams ¶
type UpdatePlayerEmailParams struct {
Email sql.NullString `json:"email"`
PlayerID int64 `json:"player_id"`
}
type UpdatePlayerPositionParams ¶
type UpdatePlayerPositionParams struct {
WorldX sql.NullFloat64 `json:"world_x"`
WorldY sql.NullFloat64 `json:"world_y"`
WorldZ sql.NullFloat64 `json:"world_z"`
CurrentChunkX sql.NullInt64 `json:"current_chunk_x"`
CurrentChunkZ sql.NullInt64 `json:"current_chunk_z"`
PlayerID int64 `json:"player_id"`
}
type UpdatePlayerStatsParams ¶
type UpdatePlayerStatsParams struct {
TotalResourcesHarvested sql.NullInt64 `json:"total_resources_harvested"`
TotalHarvestSessions sql.NullInt64 `json:"total_harvest_sessions"`
IronOreHarvested sql.NullInt64 `json:"iron_ore_harvested"`
GoldOreHarvested sql.NullInt64 `json:"gold_ore_harvested"`
WoodHarvested sql.NullInt64 `json:"wood_harvested"`
StoneHarvested sql.NullInt64 `json:"stone_harvested"`
UniqueNodesDiscovered sql.NullInt64 `json:"unique_nodes_discovered"`
TotalNodesHarvested sql.NullInt64 `json:"total_nodes_harvested"`
PlayerID int64 `json:"player_id"`
}