Documentation ¶
Index ¶
- func CreateCompositeKey(objectType string, attributes []string) (string, error)
- func CreateCompositeKeyOrPanic(objectType string, attributes []string) string
- func CreateRangeKeysForPartialCompositeKey(objectType string, attributes []string) (string, string, error)
- func GetDriverNameFromConf(sp view.ServiceProvider) string
- func SplitCompositeKey(compositeKey string) (string, []string, error)
- type ConfigProvider
- type Iterator
- type KVS
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateCompositeKey ¶
CreateCompositeKey and its related functions and consts copied from core/chaincode/shim/chaincode.go
func GetDriverNameFromConf ¶
func GetDriverNameFromConf(sp view.ServiceProvider) string
GetDriverNameFromConf returns the driver name from the node's configuration
Types ¶
type ConfigProvider ¶
type ConfigProvider interface { // UnmarshalKey takes a single key and unmarshals it into a Struct UnmarshalKey(key string, rawVal interface{}) error // IsSet checks to see if the key has been set in any of the data locations IsSet(key string) bool // GetInt returns the value associated with the key as an integer GetInt(key string) int }
ConfigProvider models the DB configuration provider
type KVS ¶
type KVS struct {
// contains filtered or unexported fields
}
func GetService ¶
func GetService(ctx view.ServiceProvider) *KVS
GetService returns the KVS instance registered in the passed context. If no KVS instance is registered, it panics.
func New ¶
func New(sp view.ServiceProvider, driverName, namespace string) (*KVS, error)
New returns a new KVS instance for the passed namespace using the passed driver
func NewWithConfig ¶
func NewWithConfig(sp view.ServiceProvider, driverName, namespace string, cp ConfigProvider) (*KVS, error)
NewWithConfig returns a new KVS instance for the passed namespace using the passed driver and config provider
func (*KVS) GetByPartialCompositeID ¶
Click to show internal directories.
Click to hide internal directories.