protodb

package
v0.26.0-rc0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package protodb is a generated protocol buffer package.

It is generated from these files:

defs.proto

It has these top-level messages:

Batch
Operation
Entity
Nothing
Domain
Iterator
Stats
Init

Index

Constants

This section is empty.

Variables

View Source
var Operation_Type_name = map[int32]string{
	0: "SET",
	1: "DELETE",
}
View Source
var Operation_Type_value = map[string]int32{
	"SET":    0,
	"DELETE": 1,
}

Functions

func RegisterDBServer

func RegisterDBServer(s *grpc.Server, srv DBServer)

Types

type Batch

type Batch struct {
	Ops []*Operation `protobuf:"bytes,1,rep,name=ops" json:"ops,omitempty"`
}

func (*Batch) Descriptor

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

func (*Batch) GetOps

func (m *Batch) GetOps() []*Operation

func (*Batch) ProtoMessage

func (*Batch) ProtoMessage()

func (*Batch) Reset

func (m *Batch) Reset()

func (*Batch) String

func (m *Batch) String() string

type DBClient

type DBClient interface {
	Init(ctx context.Context, in *Init, opts ...grpc.CallOption) (*Entity, error)
	Get(ctx context.Context, in *Entity, opts ...grpc.CallOption) (*Entity, error)
	GetStream(ctx context.Context, opts ...grpc.CallOption) (DB_GetStreamClient, error)
	Has(ctx context.Context, in *Entity, opts ...grpc.CallOption) (*Entity, error)
	Set(ctx context.Context, in *Entity, opts ...grpc.CallOption) (*Nothing, error)
	SetSync(ctx context.Context, in *Entity, opts ...grpc.CallOption) (*Nothing, error)
	Delete(ctx context.Context, in *Entity, opts ...grpc.CallOption) (*Nothing, error)
	DeleteSync(ctx context.Context, in *Entity, opts ...grpc.CallOption) (*Nothing, error)
	Iterator(ctx context.Context, in *Entity, opts ...grpc.CallOption) (DB_IteratorClient, error)
	ReverseIterator(ctx context.Context, in *Entity, opts ...grpc.CallOption) (DB_ReverseIteratorClient, error)
	// rpc print(Nothing) returns (Entity) {}
	Stats(ctx context.Context, in *Nothing, opts ...grpc.CallOption) (*Stats, error)
	BatchWrite(ctx context.Context, in *Batch, opts ...grpc.CallOption) (*Nothing, error)
	BatchWriteSync(ctx context.Context, in *Batch, opts ...grpc.CallOption) (*Nothing, error)
}

func NewDBClient

func NewDBClient(cc *grpc.ClientConn) DBClient

type DBServer

type DBServer interface {
	Init(context.Context, *Init) (*Entity, error)
	Get(context.Context, *Entity) (*Entity, error)
	GetStream(DB_GetStreamServer) error
	Has(context.Context, *Entity) (*Entity, error)
	Set(context.Context, *Entity) (*Nothing, error)
	SetSync(context.Context, *Entity) (*Nothing, error)
	Delete(context.Context, *Entity) (*Nothing, error)
	DeleteSync(context.Context, *Entity) (*Nothing, error)
	Iterator(*Entity, DB_IteratorServer) error
	ReverseIterator(*Entity, DB_ReverseIteratorServer) error
	// rpc print(Nothing) returns (Entity) {}
	Stats(context.Context, *Nothing) (*Stats, error)
	BatchWrite(context.Context, *Batch) (*Nothing, error)
	BatchWriteSync(context.Context, *Batch) (*Nothing, error)
}

type DB_GetStreamClient

type DB_GetStreamClient interface {
	Send(*Entity) error
	Recv() (*Entity, error)
	grpc.ClientStream
}

type DB_GetStreamServer

type DB_GetStreamServer interface {
	Send(*Entity) error
	Recv() (*Entity, error)
	grpc.ServerStream
}

type DB_IteratorClient

type DB_IteratorClient interface {
	Recv() (*Iterator, error)
	grpc.ClientStream
}

type DB_IteratorServer

type DB_IteratorServer interface {
	Send(*Iterator) error
	grpc.ServerStream
}

type DB_ReverseIteratorClient

type DB_ReverseIteratorClient interface {
	Recv() (*Iterator, error)
	grpc.ClientStream
}

type DB_ReverseIteratorServer

type DB_ReverseIteratorServer interface {
	Send(*Iterator) error
	grpc.ServerStream
}

type Domain

type Domain struct {
	Start []byte `protobuf:"bytes,1,opt,name=start,proto3" json:"start,omitempty"`
	End   []byte `protobuf:"bytes,2,opt,name=end,proto3" json:"end,omitempty"`
}

func (*Domain) Descriptor

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

func (*Domain) GetEnd

func (m *Domain) GetEnd() []byte

func (*Domain) GetStart

func (m *Domain) GetStart() []byte

func (*Domain) ProtoMessage

func (*Domain) ProtoMessage()

func (*Domain) Reset

func (m *Domain) Reset()

func (*Domain) String

func (m *Domain) String() string

type Entity

type Entity struct {
	Id        int32  `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
	Key       []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
	Value     []byte `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
	Exists    bool   `protobuf:"varint,4,opt,name=exists" json:"exists,omitempty"`
	Start     []byte `protobuf:"bytes,5,opt,name=start,proto3" json:"start,omitempty"`
	End       []byte `protobuf:"bytes,6,opt,name=end,proto3" json:"end,omitempty"`
	Err       string `protobuf:"bytes,7,opt,name=err" json:"err,omitempty"`
	CreatedAt int64  `protobuf:"varint,8,opt,name=created_at,json=createdAt" json:"created_at,omitempty"`
}

func (*Entity) Descriptor

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

func (*Entity) GetCreatedAt

func (m *Entity) GetCreatedAt() int64

func (*Entity) GetEnd

func (m *Entity) GetEnd() []byte

func (*Entity) GetErr

func (m *Entity) GetErr() string

func (*Entity) GetExists

func (m *Entity) GetExists() bool

func (*Entity) GetId

func (m *Entity) GetId() int32

func (*Entity) GetKey

func (m *Entity) GetKey() []byte

func (*Entity) GetStart

func (m *Entity) GetStart() []byte

func (*Entity) GetValue

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

func (*Entity) ProtoMessage

func (*Entity) ProtoMessage()

func (*Entity) Reset

func (m *Entity) Reset()

func (*Entity) String

func (m *Entity) String() string

type Init

type Init struct {
	Type string `protobuf:"bytes,1,opt,name=Type" json:"Type,omitempty"`
	Name string `protobuf:"bytes,2,opt,name=Name" json:"Name,omitempty"`
	Dir  string `protobuf:"bytes,3,opt,name=Dir" json:"Dir,omitempty"`
}

func (*Init) Descriptor

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

func (*Init) GetDir

func (m *Init) GetDir() string

func (*Init) GetName

func (m *Init) GetName() string

func (*Init) GetType

func (m *Init) GetType() string

func (*Init) ProtoMessage

func (*Init) ProtoMessage()

func (*Init) Reset

func (m *Init) Reset()

func (*Init) String

func (m *Init) String() string

type Iterator

type Iterator struct {
	Domain *Domain `protobuf:"bytes,1,opt,name=domain" json:"domain,omitempty"`
	Valid  bool    `protobuf:"varint,2,opt,name=valid" json:"valid,omitempty"`
	Key    []byte  `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"`
	Value  []byte  `protobuf:"bytes,4,opt,name=value,proto3" json:"value,omitempty"`
}

func (*Iterator) Descriptor

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

func (*Iterator) GetDomain

func (m *Iterator) GetDomain() *Domain

func (*Iterator) GetKey

func (m *Iterator) GetKey() []byte

func (*Iterator) GetValid

func (m *Iterator) GetValid() bool

func (*Iterator) GetValue

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

func (*Iterator) ProtoMessage

func (*Iterator) ProtoMessage()

func (*Iterator) Reset

func (m *Iterator) Reset()

func (*Iterator) String

func (m *Iterator) String() string

type Nothing

type Nothing struct {
}

func (*Nothing) Descriptor

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

func (*Nothing) ProtoMessage

func (*Nothing) ProtoMessage()

func (*Nothing) Reset

func (m *Nothing) Reset()

func (*Nothing) String

func (m *Nothing) String() string

type Operation

type Operation struct {
	Entity *Entity        `protobuf:"bytes,1,opt,name=entity" json:"entity,omitempty"`
	Type   Operation_Type `protobuf:"varint,2,opt,name=type,enum=protodb.Operation_Type" json:"type,omitempty"`
}

func (*Operation) Descriptor

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

func (*Operation) GetEntity

func (m *Operation) GetEntity() *Entity

func (*Operation) GetType

func (m *Operation) GetType() Operation_Type

func (*Operation) ProtoMessage

func (*Operation) ProtoMessage()

func (*Operation) Reset

func (m *Operation) Reset()

func (*Operation) String

func (m *Operation) String() string

type Operation_Type

type Operation_Type int32
const (
	Operation_SET    Operation_Type = 0
	Operation_DELETE Operation_Type = 1
)

func (Operation_Type) EnumDescriptor

func (Operation_Type) EnumDescriptor() ([]byte, []int)

func (Operation_Type) String

func (x Operation_Type) String() string

type Stats

type Stats struct {
	Data   map[string]string `` /* 128-byte string literal not displayed */
	TimeAt int64             `protobuf:"varint,2,opt,name=time_at,json=timeAt" json:"time_at,omitempty"`
}

func (*Stats) Descriptor

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

func (*Stats) GetData

func (m *Stats) GetData() map[string]string

func (*Stats) GetTimeAt

func (m *Stats) GetTimeAt() int64

func (*Stats) ProtoMessage

func (*Stats) ProtoMessage()

func (*Stats) Reset

func (m *Stats) Reset()

func (*Stats) String

func (m *Stats) String() string

Jump to

Keyboard shortcuts

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