Documentation
¶
Index ¶
- Constants
- type AccountItem
- type Ban
- type Cache
- type Character
- func (c *Character) Flavor() string
- func (c *Character) NiceBirthDate() string
- func (c *Character) NiceDep() string
- func (c *Character) NiceGender() string
- func (c *Character) NiceName() string
- func (c *Character) Records() map[string]string
- func (c *Character) TableName() string
- func (c *Character) UnlockedJobs() []string
- type Country
- type DB
- func (db *DB) AllAccountItems() []*AccountItem
- func (db *DB) AllDeaths() []*Death
- func (db *DB) AllGameModes() []*GameMode
- func (db *DB) AllPlayers() []*Player
- func (db *DB) AllRounds() []*RoundStats
- func (db *DB) GetAILaws(id int64) []*RoundAILaws
- func (db *DB) GetAntags(id int64) []*RoundAntags
- func (db *DB) GetCharacter(id int64) *Character
- func (db *DB) GetDeaths(id int64) []*Death
- func (db *DB) GetLatestRound() *RoundStats
- func (db *DB) GetRound(id int64) *RoundStats
- func (db *DB) GetStats() *Stats
- func (db *DB) SearchBans(ckey string) []*Ban
- func (db *DB) SearchCharacter(species, name string) []*Character
- type Death
- type GameMode
- type GameModeSlice
- type Instance
- type NullWriter
- type Player
- type RoundAILaws
- type RoundAntags
- type RoundStats
- type SpeciesCount
- type Stats
Constants ¶
View Source
const CACHE_UPDATE = 60
Cache update every x minutes.
View Source
const MAX_ROWS = 200
Max rows DB will return for all queries.
View Source
const TIMEOUT = 30
DB connection timeout, in seconds.
View Source
const TIMEZONE_ADJUST = "EST"
Need to adjust time because the main server is running GMT-5.
View Source
const VERSION = "0.6"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountItem ¶
type AccountItem struct {
ID int64 `gorm:"column:id;primary_key"`
Timestamp time.Time `gorm:"column:time"`
CKey string `gorm:"column:ckey"`
Item string `gorm:"column:item"`
}
func (*AccountItem) TableName ¶
func (a *AccountItem) TableName() string
type Ban ¶
type Ban struct {
ID int64 `gorm:"column:id;primary_key"`
Timestamp time.Time `gorm:"column:bantime"`
CKey string `gorm:"column:ckey"`
CID string `gorm:"column:computerid"`
IP string `gorm:"column:ip"`
BanType string `gorm:"column:bantype"`
BannedJob string `gorm:"column:job"`
Admin string `gorm:"column:a_ckey"`
Reason string `gorm:"column:reason"`
Duration int64 `gorm:"column:duration"`
Expiration time.Time `gorm:"column:expiration_time"`
}
type Cache ¶
type Character ¶
type Character struct {
ID int64 `gorm:"column:id"`
CKey string `gorm:"column:ckey"`
Name string `gorm:"column:name"`
Gender string `gorm:"column:gender"`
BirthDate string `gorm:"column:birth_date"`
Species string `gorm:"column:species"`
HomeSystem string `gorm:"column:home_system"`
Citizenship string `gorm:"column:citizenship"`
Faction string `gorm:"column:faction"`
Religion string `gorm:"column:religion"`
NanotrasenRelation string `gorm:"column:nanotrasen_relation"`
Department int64 `gorm:"column:department"`
Roles string `gorm:"column:roles"`
FlavorTextsHuman string `gorm:"column:flavor_texts_human"`
FlavorTextsRobot string `gorm:"column:flavor_texts_robot"`
EmpNotes string `gorm:"column:gen_notes"`
MedNotes string `gorm:"column:med_notes"`
SecNotes string `gorm:"column:sec_notes"`
EmpRecords string `gorm:"column:gen_record"`
MedRecords string `gorm:"column:med_record"`
SecRecords string `gorm:"column:sec_record"`
JobAntag int64 `gorm:"column:job_antag"`
ExploitRecords string `gorm:"column:exploit_record"`
}
func (*Character) NiceBirthDate ¶
func (*Character) NiceGender ¶
func (*Character) UnlockedJobs ¶
type DB ¶
func (*DB) AllAccountItems ¶
func (db *DB) AllAccountItems() []*AccountItem
func (*DB) AllGameModes ¶
func (*DB) AllPlayers ¶
func (*DB) AllRounds ¶
func (db *DB) AllRounds() []*RoundStats
func (*DB) GetAILaws ¶
func (db *DB) GetAILaws(id int64) []*RoundAILaws
func (*DB) GetAntags ¶
func (db *DB) GetAntags(id int64) []*RoundAntags
func (*DB) GetCharacter ¶
func (*DB) GetLatestRound ¶
func (db *DB) GetLatestRound() *RoundStats
func (*DB) GetRound ¶
func (db *DB) GetRound(id int64) *RoundStats
func (*DB) SearchBans ¶
func (*DB) SearchCharacter ¶
type Death ¶
type Death struct {
ID int64 `gorm:"column:id;primary_key"`
RoundID int64 `gorm:"column:round_id"`
Timestamp time.Time `gorm:"column:tod"`
Name string `gorm:"column:name"`
Job string `gorm:"column:job"`
Room string `gorm:"column:pod"`
Position string `gorm:"column:coord"`
Brute int64 `gorm:"column:bruteloss"`
Brain int64 `gorm:"column:brainloss"`
Fire int64 `gorm:"column:fireloss"`
Oxygen int64 `gorm:"column:oxyloss"`
}
type GameModeSlice ¶
type GameModeSlice []*GameMode
func (GameModeSlice) Len ¶
func (m GameModeSlice) Len() int
func (GameModeSlice) Less ¶
func (m GameModeSlice) Less(i, j int) bool
func (GameModeSlice) Swap ¶
func (m GameModeSlice) Swap(i, j int)
type NullWriter ¶
type NullWriter struct {
}
Matches the Writer interface, it will do nothing when Write() is called.
type RoundAILaws ¶
type RoundAILaws struct {
ID int64 `gorm:"column:id"`
RoundID int64 `gorm:"column:round_id"`
Law string `gorm:"column:law"`
}
func (*RoundAILaws) TableName ¶
func (r *RoundAILaws) TableName() string
type RoundAntags ¶
type RoundAntags struct {
}
func (*RoundAntags) TableName ¶
func (r *RoundAntags) TableName() string
type RoundStats ¶
type RoundStats struct {
ID int64 `gorm:"column:id"`
GameMode string `gorm:"column:game_mode"`
EndTime time.Time `gorm:"column:end_time"`
Duration int64 `gorm:"column:duration"`
Productivity int64 `gorm:"column:productivity"`
Deaths int64 `gorm:"column:deaths"`
Clones int64 `gorm:"column:clones"`
DispenseVolume int64 `gorm:"column:dispense_volume"`
BombsExploded int64 `gorm:"column:bombs_exploded"`
Vended int64 `gorm:"column:vended"`
RunDistance int64 `gorm:"column:run_distance"`
BloodMopped int64 `gorm:"column:blood_mopped"`
DamageCost int64 `gorm:"column:damage_cost"`
BreakTime int64 `gorm:"column:break_time"`
MonkeyDeaths int64 `gorm:"column:monkey_deaths"`
SpamBlocked int64 `gorm:"column:spam_blocked"`
PeopleSlipped int64 `gorm:"column:people_slipped"`
DoorsOpened int64 `gorm:"column:doors_opened"`
GunsFired int64 `gorm:"column:guns_fired"`
BeepskyBeatings int64 `gorm:"column:beepsky_beatings"`
DoorsWelded int64 `gorm:"column:doors_welded"`
Totalkwh int64 `gorm:"column:total_kwh"`
Artifacts int64 `gorm:"column:artifacts"`
CargoProfit int64 `gorm:"column:cargo_profit"`
TrashVented int64 `gorm:"column:trash_vented"`
AIFollow int64 `gorm:"column:ai_follow"`
Banned int64 `gorm:"column:banned"`
}
func (*RoundStats) TableName ¶
func (r *RoundStats) TableName() string
type SpeciesCount ¶
Click to show internal directories.
Click to hide internal directories.