keyvalue

package
v0.8.18 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 18, 2018 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Overview

Package keyvalue is a generated protocol buffer package.

It is generated from these files:

ingest.proto

It has these top-level messages:

KeyValue
KeyValues

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

Index

Constants

View Source
const (
	Version  = "0.2"
	RepoURL  = "github.com/janelia-flyem/dvid/datatype/keyvalue"
	TypeName = "keyvalue"
)

Variables

View Source
var (
	ErrInvalidLengthIngest = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowIngest   = fmt.Errorf("proto: integer overflow")
)

Functions

func DecodeTKey

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

DecodeTKey returns the string key used for this keyvalue.

func NewTKey

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

NewTKey returns the "key" key component.

Types

type Data

type Data struct {
	*datastore.Data
}

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

func GetByUUIDName added in v0.8.17

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

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

DeleteData deletes a key-value pair

func (*Data) DoRPC

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

DoRPC acts as a switchboard for RPC commands.

func (*Data) Equals

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

func (*Data) GetData

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

GetData gets a value using a key

func (*Data) GetKeys

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

func (*Data) GetKeysInRange

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

func (*Data) GobDecode

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

func (*Data) GobEncode

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

func (*Data) Help

func (d *Data) Help() string

func (*Data) JSONString

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

JSONString returns the JSON for this Data's configuration

func (*Data) MarshalJSON

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

func (*Data) PutData

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

PutData puts a key-value at a given uuid

func (*Data) ServeHTTP

func (d *Data) ServeHTTP(uuid dvid.UUID, ctx *datastore.VersionedCtx, w http.ResponseWriter, r *http.Request)

ServeHTTP handles all incoming HTTP requests for this data.

type KeyValue added in v0.8.17

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 added in v0.8.17

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

func (*KeyValue) Equal added in v0.8.17

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

func (*KeyValue) GetKey added in v0.8.17

func (m *KeyValue) GetKey() string

func (*KeyValue) GetValue added in v0.8.17

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

func (*KeyValue) GoString added in v0.8.17

func (this *KeyValue) GoString() string

func (*KeyValue) Marshal added in v0.8.17

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

func (*KeyValue) MarshalTo added in v0.8.17

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

func (*KeyValue) ProtoMessage added in v0.8.17

func (*KeyValue) ProtoMessage()

func (*KeyValue) Reset added in v0.8.17

func (m *KeyValue) Reset()

func (*KeyValue) Size added in v0.8.17

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

func (*KeyValue) String added in v0.8.17

func (this *KeyValue) String() string

func (*KeyValue) Unmarshal added in v0.8.17

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

type KeyValues added in v0.8.17

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

func (*KeyValues) Descriptor added in v0.8.17

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

func (*KeyValues) Equal added in v0.8.17

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

func (*KeyValues) GetKvs added in v0.8.17

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

func (*KeyValues) GoString added in v0.8.17

func (this *KeyValues) GoString() string

func (*KeyValues) Marshal added in v0.8.17

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

func (*KeyValues) MarshalTo added in v0.8.17

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

func (*KeyValues) ProtoMessage added in v0.8.17

func (*KeyValues) ProtoMessage()

func (*KeyValues) Reset added in v0.8.17

func (m *KeyValues) Reset()

func (*KeyValues) Size added in v0.8.17

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

func (*KeyValues) String added in v0.8.17

func (this *KeyValues) String() string

func (*KeyValues) Unmarshal added in v0.8.17

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

type Type

type Type struct {
	datastore.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) Help

func (dtype *Type) Help() string

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL