gamedb

package
v0.0.0-...-19ad383 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2021 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TrackingDB

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

TrackingDB describes a database of tracked playerdata

func New

func New(file string) (*TrackingDB, error)

New returns a reference to a TrackingDB object given a

valid path to a sqlite database (or a filepath to a file that doesn't
exist)

func (*TrackingDB) AddIntegration

func (t *TrackingDB) AddIntegration(discordid string, p ifaces.IPlayer) error

AddIntegration adds a tracked integration request to our database

func (*TrackingDB) AddJump

func (t *TrackingDB) AddJump(si, fi, k int64, j ifaces.JumpInfo) error

AddJump adds a jump to the tracking DB

func (*TrackingDB) Init

func (t *TrackingDB) Init() ([]*ifaces.Sector, error)

Init initializes a TrackingDB object provided it has been assigned

a database file

func (*TrackingDB) Loglevel

func (t *TrackingDB) Loglevel() int

Loglevel returns the loglevel of an avorion.Server

func (*TrackingDB) RemoveIntegration

func (t *TrackingDB) RemoveIntegration(p ifaces.IPlayer) error

RemoveIntegration removes an existing discord integration from the database

func (*TrackingDB) SetDiscordToPlayer

func (t *TrackingDB) SetDiscordToPlayer(p ifaces.IPlayer) error

SetDiscordToPlayer gets the Discord UID from the faction ID and sets the DiscordUID for the player

func (*TrackingDB) SetLoglevel

func (t *TrackingDB) SetLoglevel(l int)

SetLoglevel sets the loglevel of an avorion.Server

func (*TrackingDB) TrackAlliance

func (t *TrackingDB) TrackAlliance(a ifaces.IAlliance) error

TrackAlliance adds an alliance to the tracking DB

func (*TrackingDB) TrackPlayer

func (t *TrackingDB) TrackPlayer(p ifaces.IPlayer) error

TrackPlayer adds a player to the tracking DB

func (*TrackingDB) TrackSector

func (t *TrackingDB) TrackSector(sec *ifaces.Sector) error

TrackSector add a sector to the DB of tracked sector instances

func (*TrackingDB) UUID

func (t *TrackingDB) UUID() string

UUID returns the UUID of an avorion.Server

Jump to

Keyboard shortcuts

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