dvid: github.com/janelia-flyem/dvid/datatype/keyvalue Index | Files

package keyvalue

import "github.com/janelia-flyem/dvid/datatype/keyvalue"

Package keyvalue is a generated protocol buffer package.

It is generated from these files:

ingest.proto

It has these top-level messages:

KeyValue
Keys
KeyValues

Package keyvalue implements DVID support for data using generic key-value.

Index

Package Files

ingest.pb.go keys.go keyvalue.go

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")
)

func DecodeTKey Uses

func DecodeTKey(tk storage.TKey) (string, error)

DecodeTKey returns the string key used for this keyvalue.

func NewTKey Uses

func NewTKey(key string) (storage.TKey, error)

NewTKey returns the "key" key component.

type Data Uses

type Data struct {
    *datastore.Data
}

Data embeds the datastore's Data and extends it with keyvalue properties (none for now).

func GetByUUIDName Uses

func GetByUUIDName(uuid dvid.UUID, name dvid.InstanceName) (*Data, error)

GetByUUIDName returns a pointer to labelblk data given a UUID and data name.

func (*Data) DeleteData Uses

func (d *Data) DeleteData(ctx storage.Context, keyStr string) error

DeleteData deletes a key-value pair

func (*Data) DescribeTKeyClass Uses

func (d *Data) DescribeTKeyClass(tkc storage.TKeyClass) string

DescribeTKeyClass returns a string explanation of what a particular TKeyClass is used for. Implements the datastore.TKeyClassDescriber interface.

func (*Data) DoRPC Uses

func (d *Data) DoRPC(request datastore.Request, reply *datastore.Response) error

DoRPC acts as a switchboard for RPC commands.

func (*Data) Equals Uses

func (d *Data) Equals(d2 *Data) bool

func (*Data) GetData Uses

func (d *Data) GetData(ctx storage.Context, keyStr string) ([]byte, bool, error)

GetData gets a value using a key

func (*Data) GetKeys Uses

func (d *Data) GetKeys(ctx storage.Context) ([]string, error)

func (*Data) GetKeysInRange Uses

func (d *Data) GetKeysInRange(ctx storage.Context, keyBeg, keyEnd string) ([]string, error)

func (*Data) GobDecode Uses

func (d *Data) GobDecode(b []byte) error

func (*Data) GobEncode Uses

func (d *Data) GobEncode() ([]byte, error)

func (*Data) Help Uses

func (d *Data) Help() string

func (*Data) JSONString Uses

func (d *Data) JSONString() (jsonStr string, err error)

JSONString returns the JSON for this Data's configuration

func (*Data) KeyExists Uses

func (d *Data) KeyExists(ctx storage.Context, keyStr string) (bool, error)

KeyExists returns true if a key is found.

func (*Data) MarshalJSON Uses

func (d *Data) MarshalJSON() ([]byte, error)

func (*Data) PutData Uses

func (d *Data) PutData(ctx storage.Context, keyStr string, value []byte) error

PutData puts a key-value at a given uuid

func (*Data) ServeHTTP Uses

func (d *Data) ServeHTTP(uuid dvid.UUID, ctx *datastore.VersionedCtx, w http.ResponseWriter, r *http.Request) (activity map[string]interface{})

ServeHTTP handles all incoming HTTP requests for this data.

type KeyValue Uses

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 Uses

func (*KeyValue) Descriptor() ([]byte, []int)

func (*KeyValue) Equal Uses

func (this *KeyValue) Equal(that interface{}) bool

func (*KeyValue) GetKey Uses

func (m *KeyValue) GetKey() string

func (*KeyValue) GetValue Uses

func (m *KeyValue) GetValue() []byte

func (*KeyValue) GoString Uses

func (this *KeyValue) GoString() string

func (*KeyValue) Marshal Uses

func (m *KeyValue) Marshal() (dAtA []byte, err error)

func (*KeyValue) MarshalTo Uses

func (m *KeyValue) MarshalTo(dAtA []byte) (int, error)

func (*KeyValue) ProtoMessage Uses

func (*KeyValue) ProtoMessage()

func (*KeyValue) Reset Uses

func (m *KeyValue) Reset()

func (*KeyValue) Size Uses

func (m *KeyValue) Size() (n int)

func (*KeyValue) String Uses

func (this *KeyValue) String() string

func (*KeyValue) Unmarshal Uses

func (m *KeyValue) Unmarshal(dAtA []byte) error

type KeyValues Uses

type KeyValues struct {
    Kvs []*KeyValue `protobuf:"bytes,1,rep,name=kvs" json:"kvs,omitempty"`
}

func (*KeyValues) Descriptor Uses

func (*KeyValues) Descriptor() ([]byte, []int)

func (*KeyValues) Equal Uses

func (this *KeyValues) Equal(that interface{}) bool

func (*KeyValues) GetKvs Uses

func (m *KeyValues) GetKvs() []*KeyValue

func (*KeyValues) GoString Uses

func (this *KeyValues) GoString() string

func (*KeyValues) Marshal Uses

func (m *KeyValues) Marshal() (dAtA []byte, err error)

func (*KeyValues) MarshalTo Uses

func (m *KeyValues) MarshalTo(dAtA []byte) (int, error)

func (*KeyValues) ProtoMessage Uses

func (*KeyValues) ProtoMessage()

func (*KeyValues) Reset Uses

func (m *KeyValues) Reset()

func (*KeyValues) Size Uses

func (m *KeyValues) Size() (n int)

func (*KeyValues) String Uses

func (this *KeyValues) String() string

func (*KeyValues) Unmarshal Uses

func (m *KeyValues) Unmarshal(dAtA []byte) error

type Keys Uses

type Keys struct {
    Keys []string `protobuf:"bytes,1,rep,name=keys" json:"keys,omitempty"`
}

func (*Keys) Descriptor Uses

func (*Keys) Descriptor() ([]byte, []int)

func (*Keys) Equal Uses

func (this *Keys) Equal(that interface{}) bool

func (*Keys) GetKeys Uses

func (m *Keys) GetKeys() []string

func (*Keys) GoString Uses

func (this *Keys) GoString() string

func (*Keys) Marshal Uses

func (m *Keys) Marshal() (dAtA []byte, err error)

func (*Keys) MarshalTo Uses

func (m *Keys) MarshalTo(dAtA []byte) (int, error)

func (*Keys) ProtoMessage Uses

func (*Keys) ProtoMessage()

func (*Keys) Reset Uses

func (m *Keys) Reset()

func (*Keys) Size Uses

func (m *Keys) Size() (n int)

func (*Keys) String Uses

func (this *Keys) String() string

func (*Keys) Unmarshal Uses

func (m *Keys) Unmarshal(dAtA []byte) error

type Type Uses

type Type struct {
    datastore.Type
}

Type embeds the datastore's Type to create a unique type for keyvalue functions.

func NewType Uses

func NewType() *Type

NewType returns a pointer to a new keyvalue Type with default values set.

func (*Type) Help Uses

func (dtype *Type) Help() string

func (*Type) NewDataService Uses

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.

Package keyvalue imports 17 packages (graph) and is imported by 2 packages. Updated 2019-05-29. Refresh now. Tools for package owners.