Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CouchDBStore ¶
type CouchDBStore struct {
// contains filtered or unexported fields
}
CouchDBStore represents a CouchDB-backed database.
func (*CouchDBStore) Delete ¶
func (c *CouchDBStore) Delete(k string) error
Delete will delete record with k key.
func (*CouchDBStore) Get ¶
func (c *CouchDBStore) Get(k string) ([]byte, error)
Get retrieves the value in the store associated with the given key.
func (*CouchDBStore) Iterator ¶
func (c *CouchDBStore) Iterator(startKey, endKey string) storage.StoreIterator
Iterator returns iterator for the latest snapshot of the underlying db.
type Option ¶
type Option func(opts *Provider)
Option configures the couchdb provider.
func WithDBPrefix ¶
WithDBPrefix option is for adding prefix to db name.
type Provider ¶
Provider represents an CouchDB implementation of the storage.Provider interface.
func NewProvider ¶
NewProvider instantiates Provider. Certain stores like couchdb cannot accept key IDs with '_' prefix, to avoid getting errors with such values, key ID need to be base58 encoded for these stores. In order to do so, the store must be wrapped using base58wrapper.
func (*Provider) CloseStore ¶
CloseStore closes a previously opened store.