Documentation ¶
Index ¶
- func GetJsonForFind(startKey string, endKey string, limit int, lastKey string) ([]byte, error)
- func Init(stub cached_stub.CachedStubInterface, logLevel ...shim.LoggingLevel) ([]byte, error)
- type CloudantIndexDatastoreImpl
- func (ds CloudantIndexDatastoreImpl) GetIndex(stub cached_stub.CachedStubInterface, dataKey string, dataHash ...string) ([]byte, error)
- func (ds CloudantIndexDatastoreImpl) GetIndexByRange(stub cached_stub.CachedStubInterface, startKey string, endKey string, ...) (shim.StateQueryIteratorInterface, error)
- func (ds CloudantIndexDatastoreImpl) PutIndex(stub cached_stub.CachedStubInterface, dataKey string, encryptedData []byte) (string, error)
- type Docs
- type IndexDatastoreInterface
- type IndexIter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetJsonForFind ¶
func Init ¶
func Init(stub cached_stub.CachedStubInterface, logLevel ...shim.LoggingLevel) ([]byte, error)
Init sets up the cloudant index package
Types ¶
type CloudantIndexDatastoreImpl ¶
type CloudantIndexDatastoreImpl struct { datastore.DatastoreInterface // contains filtered or unexported fields }
Shell of cloudant impl. To be impl in different MR
func (CloudantIndexDatastoreImpl) GetIndex ¶
func (ds CloudantIndexDatastoreImpl) GetIndex(stub cached_stub.CachedStubInterface, dataKey string, dataHash ...string) ([]byte, error)
func (CloudantIndexDatastoreImpl) GetIndexByRange ¶
func (ds CloudantIndexDatastoreImpl) GetIndexByRange(stub cached_stub.CachedStubInterface, startKey string, endKey string, limit int, lastKey string) (shim.StateQueryIteratorInterface, error)
func (CloudantIndexDatastoreImpl) PutIndex ¶
func (ds CloudantIndexDatastoreImpl) PutIndex(stub cached_stub.CachedStubInterface, dataKey string, encryptedData []byte) (string, error)
PutIndex writes index data to the store, and returns hash
type Docs ¶
type Docs struct {
Docs []cloudant.DbCloudantData `json:"docs"`
}
type IndexDatastoreInterface ¶
type IndexDatastoreInterface interface { datastore.DatastoreInterface GetIndex(stub cached_stub.CachedStubInterface, dataKey string, dataHash ...string) ([]byte, error) GetIndexByRange(stub cached_stub.CachedStubInterface, startKey string, endKey string, limit int, lastKey string) (shim.StateQueryIteratorInterface, error) PutIndex(stub cached_stub.CachedStubInterface, dataKey string, encryptedData []byte) (string, error) }
CachedStubInterface extends ChaincodeStubInterface
func GetIndexDatastoreImpl ¶
func GetIndexDatastoreImpl(stub cached_stub.CachedStubInterface, datastoreConnectionID string) (IndexDatastoreInterface, error)
GetDatastoreImpl returns a new IndexDatastoreImpl instance that is initialized with DatastoreConnection identified by datastoreConnectionID. Caller should call this method once in a transaction and reuse the instance for data persistence.
type IndexIter ¶
type IndexIter struct { FirstKey string //inclusive LastKey string //exclusive Docs []cloudant.DbCloudantData Current int Closed bool }
func NewIndexIter ¶
Click to show internal directories.
Click to hide internal directories.