Documentation ¶
Index ¶
- func DeleteDatastoreConnection(stub cached_stub.CachedStubInterface, caller data_model.User, ...) error
- func GetDatastoreConnection(stub cached_stub.CachedStubInterface, datastoreConnectionID string) (datastore.DatastoreConnection, error)
- func GetDatastoreImpl(stub cached_stub.CachedStubInterface, datastoreConnectionID string) (datastore.DatastoreInterface, error)
- func Init(stub cached_stub.CachedStubInterface, logLevel ...shim.LoggingLevel) ([]byte, error)
- func InitDefaultDatastore(stub cached_stub.CachedStubInterface, args ...string) ([]byte, error)
- func IsRegisteredDatastoreType(datastoreType string) bool
- func PutDatastoreConnection(stub cached_stub.CachedStubInterface, caller data_model.User, ...) error
- func RegisterDatastoreImpl(caller data_model.User, datastoreType string, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteDatastoreConnection ¶
func DeleteDatastoreConnection(stub cached_stub.CachedStubInterface, caller data_model.User, datastoreConnectionID string) error
DeleteDatastoreConnection deletes a DatastoreConnection from the Ledger. If the datastoreConnectionID does not exist on the Ledger, it does nothing. Caller must have an app admin role to use this method.
func GetDatastoreConnection ¶
func GetDatastoreConnection(stub cached_stub.CachedStubInterface, datastoreConnectionID string) (datastore.DatastoreConnection, error)
GetDatastoreConnection returns DatastoreConnection from the ledger
func GetDatastoreImpl ¶
func GetDatastoreImpl(stub cached_stub.CachedStubInterface, datastoreConnectionID string) (datastore.DatastoreInterface, error)
GetDatastoreImpl returns a new DatastoreImpl 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.
func Init ¶
func Init(stub cached_stub.CachedStubInterface, logLevel ...shim.LoggingLevel) ([]byte, error)
Init sets up the datastore package by adding default ledger connection.
func InitDefaultDatastore ¶
func InitDefaultDatastore(stub cached_stub.CachedStubInterface, args ...string) ([]byte, error)
InitDefaultDatastore sets up the default off-chain Cloudant datastore.
func IsRegisteredDatastoreType ¶
IsRegisteredDatastoreType returns true if the datastore type is one of the default ones or registered via RegisterDatastoreImpl method
func PutDatastoreConnection ¶
func PutDatastoreConnection(stub cached_stub.CachedStubInterface, caller data_model.User, datastoreConnection datastore.DatastoreConnection) error
PutDatastoreConnection puts a DatastoreConnection on the Ledger (encrypted). Validates that Datastore Type must be either default ones or registered via RegisterDatastoreImpl method
func RegisterDatastoreImpl ¶
func RegisterDatastoreImpl(caller data_model.User, datastoreType string, implementation datastore.DatastoreInterface) error
RegisterDatastoreImpl is used by Solution to register a new Datastore Type. If default off-chain storage implementation is sufficient for your use case, there is no need to use this method.
Types ¶
This section is empty.