Documentation ¶
Index ¶
- type BoltPersistence
- func (bp *BoltPersistence) Check(bucket string, name string) (bool, error)
- func (bp *BoltPersistence) Close()
- func (bp *BoltPersistence) Load(bucket string, name string, value interface{}) error
- func (bp *BoltPersistence) Open(handle string) error
- func (bp *BoltPersistence) Persist(bucket string, name string, value interface{}) error
- func (bp *BoltPersistence) Setup(buckets []string) error
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BoltPersistence ¶
type BoltPersistence struct {
// contains filtered or unexported fields
}
BoltPersistence creates a persistence services backed by an on-disk bolt database
func (*BoltPersistence) Check ¶
func (bp *BoltPersistence) Check(bucket string, name string) (bool, error)
Check returns true if the record exists in the given bucket.
func (*BoltPersistence) Load ¶
func (bp *BoltPersistence) Load(bucket string, name string, value interface{}) error
Load reads a value from a given bucket.
func (*BoltPersistence) Open ¶
func (bp *BoltPersistence) Open(handle string) error
Open opens a database
func (*BoltPersistence) Persist ¶
func (bp *BoltPersistence) Persist(bucket string, name string, value interface{}) error
Persist stores a record in the database
func (*BoltPersistence) Setup ¶
func (bp *BoltPersistence) Setup(buckets []string) error
Setup initializes the given buckets if they do not exist in the database
type Service ¶
type Service interface { Open(handle string) error Setup(buckets []string) error Persist(bucket string, name string, value interface{}) error Check(bucket string, name string) (bool, error) Load(bucket string, name string, value interface{}) error Close() }
Service provides a consistent interface for interacting with on-disk, in-memory or server-backed storage
Click to show internal directories.
Click to hide internal directories.