Documentation ¶
Index ¶
- Variables
- type DBValue
- func (*DBValue) Descriptor() ([]byte, []int)
- func (m *DBValue) GetMetadata() []byte
- func (m *DBValue) GetValue() []byte
- func (m *DBValue) GetVersion() []byte
- func (*DBValue) ProtoMessage()
- func (m *DBValue) Reset()
- func (m *DBValue) String() string
- func (m *DBValue) XXX_DiscardUnknown()
- func (m *DBValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *DBValue) XXX_Merge(src proto.Message)
- func (m *DBValue) XXX_Size() int
- func (m *DBValue) XXX_Unmarshal(b []byte) error
- type TestVDBEnv
- type VersionedDBProvider
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // TestEnvDBValueformat exports the constant to be used used for tests TestEnvDBValueformat = fullScanIteratorValueFormat // TestEnvDBValueDecoder exports the function for decoding the dbvalue bytes TestEnvDBValueDecoder = func(dbValue []byte) (*statedb.VersionedValue, error) { return decodeValue(dbValue) } )
Functions ¶
This section is empty.
Types ¶
type DBValue ¶
type DBValue struct { Version []byte `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` Metadata []byte `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*DBValue) Descriptor ¶
func (*DBValue) GetMetadata ¶
func (*DBValue) GetVersion ¶
func (*DBValue) ProtoMessage ¶
func (*DBValue) ProtoMessage()
func (*DBValue) XXX_DiscardUnknown ¶
func (m *DBValue) XXX_DiscardUnknown()
func (*DBValue) XXX_Marshal ¶
func (*DBValue) XXX_Unmarshal ¶
type TestVDBEnv ¶
type TestVDBEnv struct { DBProvider *VersionedDBProvider // contains filtered or unexported fields }
TestVDBEnv provides a level db backed versioned db for testing
func NewTestVDBEnv ¶
func NewTestVDBEnv(t testing.TB) *TestVDBEnv
NewTestVDBEnv instantiates and new level db backed TestVDB
func (*TestVDBEnv) Cleanup ¶
func (env *TestVDBEnv) Cleanup()
Cleanup closes the db and removes the db folder
type VersionedDBProvider ¶
type VersionedDBProvider struct {
// contains filtered or unexported fields
}
VersionedDBProvider implements interface VersionedDBProvider
func NewVersionedDBProvider ¶
func NewVersionedDBProvider(dbPath string) (*VersionedDBProvider, error)
NewVersionedDBProvider instantiates VersionedDBProvider
func (*VersionedDBProvider) Close ¶
func (provider *VersionedDBProvider) Close()
Close closes the underlying db
func (*VersionedDBProvider) GetDBHandle ¶
func (provider *VersionedDBProvider) GetDBHandle(dbName string, namespaceProvider statedb.NamespaceProvider) (statedb.VersionedDB, error)
GetDBHandle gets the handle to a named database
Click to show internal directories.
Click to hide internal directories.