Documentation ¶
Index ¶
- type DB
- func (d *DB) AddCombo(elems []int, result int) error
- func (d *DB) BeginTransaction()
- func (d *DB) Cats() map[string]*types.Category
- func (d *DB) Close()
- func (d *DB) ComboCnt() int
- func (d *DB) Combos() map[string]int
- func (d *DB) CommitTransaction() error
- func (d *DB) DelCatCache(name string) error
- func (d *DB) DeletePoll(poll types.Poll) error
- func (d *DB) DeleteVCat(name string) error
- func (d *DB) GetCat(name string) (*types.Category, types.GetResponse)
- func (d *DB) GetCatCache(name string) (map[int]types.Empty, bool)
- func (d *DB) GetCombo(elems []int) (int, types.GetResponse)
- func (d *DB) GetElement(id int, nolock ...bool) (types.Element, types.GetResponse)
- func (d *DB) GetElementByName(name string, nolock ...bool) (types.Element, types.GetResponse)
- func (d *DB) GetIDByName(name string) (int, types.GetResponse)
- func (d *DB) GetInv(id string) *types.Inventory
- func (d *DB) GetPoll(id string) (types.Poll, types.GetResponse)
- func (d *DB) GetVCat(name string) (*types.VirtualCategory, types.GetResponse)
- func (d *DB) Invs() map[string]*types.Inventory
- func (d *DB) NewCat(name string) *types.Category
- func (d *DB) NewPoll(poll types.Poll) error
- func (b *DB) Optimize() error
- func (b *DB) OptimizeCats() error
- func (d *DB) Recalc() error
- func (d *DB) SaveCat(elems *types.Category) error
- func (d *DB) SaveCatCache(name string, elems map[int]types.Empty) error
- func (d *DB) SaveConfig() error
- func (d *DB) SaveElement(el types.Element, new ...bool) error
- func (d *DB) SaveInv(inv *types.Inventory, recalc ...bool) error
- func (d *DB) SavePoll(poll types.Poll)
- func (d *DB) SaveVCat(vcat *types.VirtualCategory) error
- func (d *DB) VCats() map[string]*types.VirtualCategory
- type Data
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct { sync.RWMutex Guild string Elements []types.Element Polls map[string]types.Poll // map[messageid]poll Config *types.ServerConfig AI *ai.AI // contains filtered or unexported fields }
func (*DB) BeginTransaction ¶
func (d *DB) BeginTransaction()
func (*DB) CommitTransaction ¶
func (*DB) DelCatCache ¶
func (*DB) DeleteVCat ¶
func (*DB) GetElement ¶
func (*DB) GetElementByName ¶
func (*DB) GetIDByName ¶
func (d *DB) GetIDByName(name string) (int, types.GetResponse)
func (*DB) GetVCat ¶
func (d *DB) GetVCat(name string) (*types.VirtualCategory, types.GetResponse)
func (*DB) OptimizeCats ¶
func (*DB) SaveConfig ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.