Documentation ¶
Overview ¶
Package db implements simple method of treatment to bbolt db.
Index ¶
- Constants
- Variables
- func SaveModel(bucket *Bucket, imodel interface{}) Error
- type Bucket
- func (bucket *Bucket) Count() uint
- func (bucket *Bucket) DB() *DB
- func (bucket *Bucket) Delete(key uint) Error
- func (bucket *Bucket) Get(key uint) (Model, Error)
- func (bucket *Bucket) Model() Model
- func (bucket *Bucket) Name() string
- func (bucket *Bucket) Set(key uint, value string, save_bucket ...string) Error
- type DB
- type Manager
- func (manager *Manager) All() []Model
- func (manager *Manager) Bucket() *Bucket
- func (manager *Manager) Copy() *Manager
- func (manager *Manager) Count() uint
- func (manager *Manager) Filter(include Params, exclude ...Params) *Manager
- func (manager *Manager) FilterChan(include Params, exclude ...Params) (chan Model, uint)
- func (manager *Manager) First() Model
- func (manager *Manager) Get(id uint) Model
- func (manager *Manager) IsInstance() bool
- func (manager *Manager) Last() Model
- type Model
- type Params
Constants ¶
View Source
const DELETE = "DELETE"
Variables ¶
View Source
var OpenChansModel = map[uint]bool{}
Functions ¶
Types ¶
type Bucket ¶
type Bucket struct { Objects Manager // contains filtered or unexported fields }
Bucket implements interface simple access to read/write in bbolt db.
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
DB implements interface access to bbolt db.
func (*DB) Bucket ¶
Bucket returns pointer to Bucket in db, Returns error if name is blank, or name is too long.
func (*DB) ExistsBucket ¶
ExistsBucket returns true if bucket exists.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func (*Manager) FilterChan ¶ added in v0.7.0
func (*Manager) IsInstance ¶
Click to show internal directories.
Click to hide internal directories.