Documentation ¶
Overview ¶
Package store provides the store logic for the application
Index ¶
- type BoltStore
- func (b *BoltStore) Backup(writer io.Writer) (int, error)
- func (b *BoltStore) Clear() error
- func (b *BoltStore) Close() error
- func (b *BoltStore) CreateBuckets(conf config.ValidStoreConfig) error
- func (b *BoltStore) DeleteObject(bucket, key string) error
- func (b *BoltStore) GetObject(bucket, key string) ([]byte, error)
- func (b *BoltStore) GetObjectReader(bucket, key string) (io.Reader, error)
- func (b *BoltStore) ListBuckets() ([]string, error)
- func (b *BoltStore) ListObjects(bucket string) ([]string, error)
- func (b *BoltStore) PutObject(bucket, key string, data []byte) error
- func (b *BoltStore) PutObjectReader(bucket, key string, reader io.Reader) error
- func (b *BoltStore) SetupStore(env string, conf config.ValidStoreConfig) error
- type Store
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BoltStore ¶
type BoltStore struct {
// contains filtered or unexported fields
}
BoltStore is a store that uses BoltDB
func (*BoltStore) CreateBuckets ¶
func (b *BoltStore) CreateBuckets(conf config.ValidStoreConfig) error
CreateBuckets creates buckets in the store
func (*BoltStore) DeleteObject ¶
DeleteObject deletes an object from the store
func (*BoltStore) GetObjectReader ¶
GetObjectReader gets an object from the store as a reader
func (*BoltStore) ListBuckets ¶
ListBuckets lists all buckets in the store
func (*BoltStore) ListObjects ¶
ListObjects lists all objects in a bucket
func (*BoltStore) PutObjectReader ¶
PutObjectReader puts an object in the store from a reader
func (*BoltStore) SetupStore ¶
func (b *BoltStore) SetupStore(env string, conf config.ValidStoreConfig) error
SetupStore sets up the BoltStore
type Store ¶
type Store interface { SetupStore(env string, conf config.ValidStoreConfig) error CreateBuckets(conf config.ValidStoreConfig) error PutObject(bucket, key string, data []byte) error GetObject(bucket, key string) ([]byte, error) PutObjectReader(bucket, key string, reader io.Reader) error GetObjectReader(bucket, key string) (io.Reader, error) DeleteObject(bucket, key string) error ListObjects(bucket string) ([]string, error) ListBuckets() ([]string, error) Backup(writer io.Writer) (int, error) Clear() error Close() error }
Store is the interface for a store
func NewStoreFromConfig ¶
func NewStoreFromConfig(_ config.ValidStoreConfig) (Store, error)
NewStoreFromConfig creates a new store from the configuration
Click to show internal directories.
Click to hide internal directories.