Documentation ¶
Overview ¶
Package db implements simple method of treatment to bbolt db.
Index ¶
- Constants
- func SaveModel(bucket *Bucket, model Model) Error
- type Bucket
- type DB
- type Manager
- func (manager *Manager) All() []Model
- func (manager *Manager) Bucket() *Bucket
- func (manager *Manager) CheckModel(model Model, include Params, exclude ...Params) bool
- func (manager *Manager) Copy() *Manager
- func (manager *Manager) Count() uint
- func (manager *Manager) Delete(id uint)
- func (manager *Manager) Filter(include Params, exclude ...Params) *Manager
- 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 ¶
This section is empty.
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.
func (*Bucket) DeleteAll ¶ added in v0.8.0
func (bucket *Bucket) DeleteAll() Error
DeleteAll implements Deleting all values in bucket.
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) CheckModel ¶ added in v0.8.0
func (*Manager) IsInstance ¶
Click to show internal directories.
Click to hide internal directories.