Documentation
¶
Index ¶
- Constants
- Variables
- func Cherr(e error)
- func Rdb(db *bolt.DB, k int, cbuc []byte) (v []byte, e error)
- func Setmac() map[string]int
- func Wradmin(a Admin, db *bolt.DB)
- func Wrdb(db *bolt.DB, k int, v []byte, cbuc []byte) (e error)
- type Admin
- type Apicall
- type Game
- type Hfn
- type Pdata
- type Player
- type Pstat
- type Tournament
Constants ¶
View Source
const DATAPATH = "data/"
View Source
const DEF_DBNAME = "data/gambot.db" // Default database filename
View Source
const DEF_PORT = 9001 // Default server port
View Source
const MAC_FILE = "static/mac.json" // Macro definition file
View Source
const NMAXLEN = 30 // Player name max length
Variables ¶
View Source
var Abuc = []byte("abuc") // admin bucket
View Source
var Gbuc = []byte("gbuc") // game bucket
View Source
var Mac map[string]int // Global macro object
View Source
var Pbuc = []byte("pbuc") // player bucket
View Source
var Tbuc = []byte("tbuc") // tournament bucket
Functions ¶
Types ¶
type Apicall ¶
type Apicall struct { Action string Algo string Pass string Opass string Skey string Set string Pwin string Pdraw string Ploss string PPage string N string T string I string Tpt string ID string Game string Name string Fname string Lname string Gender string Dbirth string Email string Postal string Zip string Phone string Club string LichessUser string }
type Player ¶
type Player struct { ID int Uname string ELO float64 Pass []byte Pi Pdata TN Pstat AT Pstat Active bool Pause bool Status int }
func Getallplayers ¶
Returns slice containing all player objects in db
Click to show internal directories.
Click to hide internal directories.