Documentation ¶
Overview ¶
Package keyvalue implements DVID support for data using generic key-value.
Index ¶
- Constants
- Variables
- func DecodeTKey(tk storage.TKey) (string, error)
- func NewTKey(key string) (storage.TKey, error)
- type Data
- func (d *Data) DeleteData(ctx storage.Context, keyStr string) error
- func (d *Data) DescribeTKeyClass(tkc storage.TKeyClass) string
- func (d *Data) DoRPC(request datastore.Request, reply *datastore.Response) error
- func (d *Data) Equals(d2 *Data) bool
- func (d *Data) GetData(ctx storage.Context, keyStr string) ([]byte, bool, error)
- func (d *Data) GetKeys(ctx storage.Context) ([]string, error)
- func (d *Data) GetKeysInRange(ctx storage.Context, keyBeg, keyEnd string) ([]string, error)
- func (d *Data) GobDecode(b []byte) error
- func (d *Data) GobEncode() ([]byte, error)
- func (d *Data) Help() string
- func (d *Data) JSONString() (jsonStr string, err error)
- func (d *Data) KeyExists(ctx storage.Context, keyStr string) (bool, error)
- func (d *Data) MarshalJSON() ([]byte, error)
- func (d *Data) PutData(ctx storage.Context, keyStr string, value []byte) error
- func (d *Data) ServeHTTP(uuid dvid.UUID, ctx *datastore.VersionedCtx, w http.ResponseWriter, ...) (activity map[string]interface{})
- type KeyValue
- func (*KeyValue) Descriptor() ([]byte, []int)
- func (this *KeyValue) Equal(that interface{}) bool
- func (m *KeyValue) GetKey() string
- func (m *KeyValue) GetValue() []byte
- func (this *KeyValue) GoString() string
- func (m *KeyValue) Marshal() (dAtA []byte, err error)
- func (m *KeyValue) MarshalTo(dAtA []byte) (int, error)
- func (*KeyValue) ProtoMessage()
- func (m *KeyValue) Reset()
- func (m *KeyValue) Size() (n int)
- func (this *KeyValue) String() string
- func (m *KeyValue) Unmarshal(dAtA []byte) error
- type KeyValues
- func (*KeyValues) Descriptor() ([]byte, []int)
- func (this *KeyValues) Equal(that interface{}) bool
- func (m *KeyValues) GetKvs() []*KeyValue
- func (this *KeyValues) GoString() string
- func (m *KeyValues) Marshal() (dAtA []byte, err error)
- func (m *KeyValues) MarshalTo(dAtA []byte) (int, error)
- func (*KeyValues) ProtoMessage()
- func (m *KeyValues) Reset()
- func (m *KeyValues) Size() (n int)
- func (this *KeyValues) String() string
- func (m *KeyValues) Unmarshal(dAtA []byte) error
- type Keys
- func (*Keys) Descriptor() ([]byte, []int)
- func (this *Keys) Equal(that interface{}) bool
- func (m *Keys) GetKeys() []string
- func (this *Keys) GoString() string
- func (m *Keys) Marshal() (dAtA []byte, err error)
- func (m *Keys) MarshalTo(dAtA []byte) (int, error)
- func (*Keys) ProtoMessage()
- func (m *Keys) Reset()
- func (m *Keys) Size() (n int)
- func (this *Keys) String() string
- func (m *Keys) Unmarshal(dAtA []byte) error
- type Type
Constants ¶
const ( Version = "0.2" RepoURL = "github.com/janelia-flyem/dvid/datatype/keyvalue" TypeName = "keyvalue" )
Variables ¶
var ( ErrInvalidLengthIngest = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowIngest = fmt.Errorf("proto: integer overflow") )
Functions ¶
func DecodeTKey ¶
DecodeTKey returns the string key used for this keyvalue.
Types ¶
type Data ¶
Data embeds the datastore's Data and extends it with keyvalue properties (none for now).
func GetByUUIDName ¶
GetByUUIDName returns a pointer to labelblk data given a UUID and data name.
func (*Data) DeleteData ¶
DeleteData deletes a key-value pair
func (*Data) DescribeTKeyClass ¶
DescribeTKeyClass returns a string explanation of what a particular TKeyClass is used for. Implements the datastore.TKeyClassDescriber interface.
func (*Data) GetKeysInRange ¶
func (*Data) JSONString ¶
JSONString returns the JSON for this Data's configuration
func (*Data) MarshalJSON ¶
type KeyValue ¶
type KeyValue struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` }
func (*KeyValue) Descriptor ¶
func (*KeyValue) ProtoMessage ¶
func (*KeyValue) ProtoMessage()
type KeyValues ¶
type KeyValues struct {
Kvs []*KeyValue `protobuf:"bytes,1,rep,name=kvs" json:"kvs,omitempty"`
}
func (*KeyValues) Descriptor ¶
func (*KeyValues) ProtoMessage ¶
func (*KeyValues) ProtoMessage()
type Keys ¶
type Keys struct {
Keys []string `protobuf:"bytes,1,rep,name=keys" json:"keys,omitempty"`
}
func (*Keys) Descriptor ¶
func (*Keys) ProtoMessage ¶
func (*Keys) ProtoMessage()
type Type ¶
Type embeds the datastore's Type to create a unique type for keyvalue functions.
func NewType ¶
func NewType() *Type
NewType returns a pointer to a new keyvalue Type with default values set.
func (*Type) NewDataService ¶
func (dtype *Type) NewDataService(uuid dvid.UUID, id dvid.InstanceID, name dvid.InstanceName, c dvid.Config) (datastore.DataService, error)
NewDataService returns a pointer to new keyvalue data with default values.