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) CreateIndex ¶ added in v0.1.3
func (c *CouchDBStore) CreateIndex(createIndexRequest storage.CreateIndexRequest) error
CreateIndex creates an index based on the provided CreateIndexRequest. createIndexRequest.IndexStorageLocation refers to the design doc that the index should get placed in. createIndexRequest.IndexName is the name for the index that will be stored in CouchDB. createIndexRequest.WhatToIndex must be a valid index object as defined here:
http://docs.couchdb.org/en/stable/api/database/find.html#db-index
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) Put ¶
func (c *CouchDBStore) Put(k string, v []byte) error
Put stores the given key-value pair in the store.
func (*CouchDBStore) Query ¶ added in v0.1.3
func (c *CouchDBStore) Query(findQuery string) (storage.ResultsIterator, error)
Query executes a query using the CouchDB _find endpoint.
type Option ¶ added in v0.1.3
type Option func(opts *Provider)
Option configures the couchdb provider
func WithDBPrefix ¶ added in v0.1.3
WithDBPrefix option is for adding prefix to db name
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider represents an CouchDB implementation of the storage.Provider interface
func NewProvider ¶
NewProvider instantiates Provider
func (*Provider) CloseStore ¶
CloseStore closes a previously opened store.
func (*Provider) CreateStore ¶
CreateStore creates a new store with the given name.