go_micro_store

package
v2.9.6 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_github_com_micro_go_micro_store_service_proto_store_proto protoreflect.FileDescriptor

Functions

func NewStoreEndpoints

func NewStoreEndpoints() []*api.Endpoint

func RegisterStoreHandler

func RegisterStoreHandler(s server.Server, hdlr StoreHandler, opts ...server.HandlerOption) error

Types

type DatabasesRequest

type DatabasesRequest struct {
	// contains filtered or unexported fields
}

func (*DatabasesRequest) Descriptor deprecated

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

Deprecated: Use DatabasesRequest.ProtoReflect.Descriptor instead.

func (*DatabasesRequest) ProtoMessage

func (*DatabasesRequest) ProtoMessage()

func (*DatabasesRequest) ProtoReflect

func (x *DatabasesRequest) ProtoReflect() protoreflect.Message

func (*DatabasesRequest) Reset

func (x *DatabasesRequest) Reset()

func (*DatabasesRequest) String

func (x *DatabasesRequest) String() string

type DatabasesResponse

type DatabasesResponse struct {
	Databases []string `protobuf:"bytes,1,rep,name=databases,proto3" json:"databases,omitempty"`
	// contains filtered or unexported fields
}

func (*DatabasesResponse) Descriptor deprecated

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

Deprecated: Use DatabasesResponse.ProtoReflect.Descriptor instead.

func (*DatabasesResponse) GetDatabases

func (x *DatabasesResponse) GetDatabases() []string

func (*DatabasesResponse) ProtoMessage

func (*DatabasesResponse) ProtoMessage()

func (*DatabasesResponse) ProtoReflect

func (x *DatabasesResponse) ProtoReflect() protoreflect.Message

func (*DatabasesResponse) Reset

func (x *DatabasesResponse) Reset()

func (*DatabasesResponse) String

func (x *DatabasesResponse) String() string

type DeleteOptions

type DeleteOptions struct {
	Database string `protobuf:"bytes,1,opt,name=database,proto3" json:"database,omitempty"`
	Table    string `protobuf:"bytes,2,opt,name=table,proto3" json:"table,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteOptions) Descriptor deprecated

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

Deprecated: Use DeleteOptions.ProtoReflect.Descriptor instead.

func (*DeleteOptions) GetDatabase

func (x *DeleteOptions) GetDatabase() string

func (*DeleteOptions) GetTable

func (x *DeleteOptions) GetTable() string

func (*DeleteOptions) ProtoMessage

func (*DeleteOptions) ProtoMessage()

func (*DeleteOptions) ProtoReflect

func (x *DeleteOptions) ProtoReflect() protoreflect.Message

func (*DeleteOptions) Reset

func (x *DeleteOptions) Reset()

func (*DeleteOptions) String

func (x *DeleteOptions) String() string

type DeleteRequest

type DeleteRequest struct {
	Key     string         `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Options *DeleteOptions `protobuf:"bytes,2,opt,name=options,proto3" json:"options,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteRequest) Descriptor deprecated

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

Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.

func (*DeleteRequest) GetKey

func (x *DeleteRequest) GetKey() string

func (*DeleteRequest) GetOptions

func (x *DeleteRequest) GetOptions() *DeleteOptions

func (*DeleteRequest) ProtoMessage

func (*DeleteRequest) ProtoMessage()

func (*DeleteRequest) ProtoReflect

func (x *DeleteRequest) ProtoReflect() protoreflect.Message

func (*DeleteRequest) Reset

func (x *DeleteRequest) Reset()

func (*DeleteRequest) String

func (x *DeleteRequest) String() string

type DeleteResponse

type DeleteResponse struct {
	// contains filtered or unexported fields
}

func (*DeleteResponse) Descriptor deprecated

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

Deprecated: Use DeleteResponse.ProtoReflect.Descriptor instead.

func (*DeleteResponse) ProtoMessage

func (*DeleteResponse) ProtoMessage()

func (*DeleteResponse) ProtoReflect

func (x *DeleteResponse) ProtoReflect() protoreflect.Message

func (*DeleteResponse) Reset

func (x *DeleteResponse) Reset()

func (*DeleteResponse) String

func (x *DeleteResponse) String() string

type Field

type Field struct {

	// type of value e.g string, int, int64, bool, float64
	Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
	// the actual value
	Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*Field) Descriptor deprecated

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

Deprecated: Use Field.ProtoReflect.Descriptor instead.

func (*Field) GetType

func (x *Field) GetType() string

func (*Field) GetValue

func (x *Field) GetValue() string

func (*Field) ProtoMessage

func (*Field) ProtoMessage()

func (*Field) ProtoReflect

func (x *Field) ProtoReflect() protoreflect.Message

func (*Field) Reset

func (x *Field) Reset()

func (*Field) String

func (x *Field) String() string

type ListOptions

type ListOptions struct {
	Database string `protobuf:"bytes,1,opt,name=database,proto3" json:"database,omitempty"`
	Table    string `protobuf:"bytes,2,opt,name=table,proto3" json:"table,omitempty"`
	Prefix   string `protobuf:"bytes,3,opt,name=prefix,proto3" json:"prefix,omitempty"`
	Suffix   string `protobuf:"bytes,4,opt,name=suffix,proto3" json:"suffix,omitempty"`
	Limit    uint64 `protobuf:"varint,5,opt,name=limit,proto3" json:"limit,omitempty"`
	Offset   uint64 `protobuf:"varint,6,opt,name=offset,proto3" json:"offset,omitempty"`
	// contains filtered or unexported fields
}

func (*ListOptions) Descriptor deprecated

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

Deprecated: Use ListOptions.ProtoReflect.Descriptor instead.

func (*ListOptions) GetDatabase

func (x *ListOptions) GetDatabase() string

func (*ListOptions) GetLimit

func (x *ListOptions) GetLimit() uint64

func (*ListOptions) GetOffset

func (x *ListOptions) GetOffset() uint64

func (*ListOptions) GetPrefix

func (x *ListOptions) GetPrefix() string

func (*ListOptions) GetSuffix

func (x *ListOptions) GetSuffix() string

func (*ListOptions) GetTable

func (x *ListOptions) GetTable() string

func (*ListOptions) ProtoMessage

func (*ListOptions) ProtoMessage()

func (*ListOptions) ProtoReflect

func (x *ListOptions) ProtoReflect() protoreflect.Message

func (*ListOptions) Reset

func (x *ListOptions) Reset()

func (*ListOptions) String

func (x *ListOptions) String() string

type ListRequest

type ListRequest struct {
	Options *ListOptions `protobuf:"bytes,1,opt,name=options,proto3" json:"options,omitempty"`
	// contains filtered or unexported fields
}

func (*ListRequest) Descriptor deprecated

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

Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.

func (*ListRequest) GetOptions

func (x *ListRequest) GetOptions() *ListOptions

func (*ListRequest) ProtoMessage

func (*ListRequest) ProtoMessage()

func (*ListRequest) ProtoReflect

func (x *ListRequest) ProtoReflect() protoreflect.Message

func (*ListRequest) Reset

func (x *ListRequest) Reset()

func (*ListRequest) String

func (x *ListRequest) String() string

type ListResponse

type ListResponse struct {
	Keys []string `protobuf:"bytes,2,rep,name=keys,proto3" json:"keys,omitempty"`
	// contains filtered or unexported fields
}

func (*ListResponse) Descriptor deprecated

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

Deprecated: Use ListResponse.ProtoReflect.Descriptor instead.

func (*ListResponse) GetKeys

func (x *ListResponse) GetKeys() []string

func (*ListResponse) ProtoMessage

func (*ListResponse) ProtoMessage()

func (*ListResponse) ProtoReflect

func (x *ListResponse) ProtoReflect() protoreflect.Message

func (*ListResponse) Reset

func (x *ListResponse) Reset()

func (*ListResponse) String

func (x *ListResponse) String() string

type ReadOptions

type ReadOptions struct {
	Database string `protobuf:"bytes,1,opt,name=database,proto3" json:"database,omitempty"`
	Table    string `protobuf:"bytes,2,opt,name=table,proto3" json:"table,omitempty"`
	Prefix   bool   `protobuf:"varint,3,opt,name=prefix,proto3" json:"prefix,omitempty"`
	Suffix   bool   `protobuf:"varint,4,opt,name=suffix,proto3" json:"suffix,omitempty"`
	Limit    uint64 `protobuf:"varint,5,opt,name=limit,proto3" json:"limit,omitempty"`
	Offset   uint64 `protobuf:"varint,6,opt,name=offset,proto3" json:"offset,omitempty"`
	// contains filtered or unexported fields
}

func (*ReadOptions) Descriptor deprecated

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

Deprecated: Use ReadOptions.ProtoReflect.Descriptor instead.

func (*ReadOptions) GetDatabase

func (x *ReadOptions) GetDatabase() string

func (*ReadOptions) GetLimit

func (x *ReadOptions) GetLimit() uint64

func (*ReadOptions) GetOffset

func (x *ReadOptions) GetOffset() uint64

func (*ReadOptions) GetPrefix

func (x *ReadOptions) GetPrefix() bool

func (*ReadOptions) GetSuffix

func (x *ReadOptions) GetSuffix() bool

func (*ReadOptions) GetTable

func (x *ReadOptions) GetTable() string

func (*ReadOptions) ProtoMessage

func (*ReadOptions) ProtoMessage()

func (*ReadOptions) ProtoReflect

func (x *ReadOptions) ProtoReflect() protoreflect.Message

func (*ReadOptions) Reset

func (x *ReadOptions) Reset()

func (*ReadOptions) String

func (x *ReadOptions) String() string

type ReadRequest

type ReadRequest struct {
	Key     string       `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Options *ReadOptions `protobuf:"bytes,2,opt,name=options,proto3" json:"options,omitempty"`
	// contains filtered or unexported fields
}

func (*ReadRequest) Descriptor deprecated

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

Deprecated: Use ReadRequest.ProtoReflect.Descriptor instead.

func (*ReadRequest) GetKey

func (x *ReadRequest) GetKey() string

func (*ReadRequest) GetOptions

func (x *ReadRequest) GetOptions() *ReadOptions

func (*ReadRequest) ProtoMessage

func (*ReadRequest) ProtoMessage()

func (*ReadRequest) ProtoReflect

func (x *ReadRequest) ProtoReflect() protoreflect.Message

func (*ReadRequest) Reset

func (x *ReadRequest) Reset()

func (*ReadRequest) String

func (x *ReadRequest) String() string

type ReadResponse

type ReadResponse struct {
	Records []*Record `protobuf:"bytes,1,rep,name=records,proto3" json:"records,omitempty"`
	// contains filtered or unexported fields
}

func (*ReadResponse) Descriptor deprecated

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

Deprecated: Use ReadResponse.ProtoReflect.Descriptor instead.

func (*ReadResponse) GetRecords

func (x *ReadResponse) GetRecords() []*Record

func (*ReadResponse) ProtoMessage

func (*ReadResponse) ProtoMessage()

func (*ReadResponse) ProtoReflect

func (x *ReadResponse) ProtoReflect() protoreflect.Message

func (*ReadResponse) Reset

func (x *ReadResponse) Reset()

func (*ReadResponse) String

func (x *ReadResponse) String() string

type Record

type Record struct {

	// key of the record
	Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// value in the record
	Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// time.Duration (signed int64 nanoseconds)
	Expiry int64 `protobuf:"varint,3,opt,name=expiry,proto3" json:"expiry,omitempty"`
	// the associated metadata
	Metadata map[string]*Field `` /* 157-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Record) Descriptor deprecated

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

Deprecated: Use Record.ProtoReflect.Descriptor instead.

func (*Record) GetExpiry

func (x *Record) GetExpiry() int64

func (*Record) GetKey

func (x *Record) GetKey() string

func (*Record) GetMetadata

func (x *Record) GetMetadata() map[string]*Field

func (*Record) GetValue

func (x *Record) GetValue() []byte

func (*Record) ProtoMessage

func (*Record) ProtoMessage()

func (*Record) ProtoReflect

func (x *Record) ProtoReflect() protoreflect.Message

func (*Record) Reset

func (x *Record) Reset()

func (*Record) String

func (x *Record) String() string

type StoreService

type StoreService interface {
	Read(ctx context.Context, in *ReadRequest, opts ...client.CallOption) (*ReadResponse, error)
	Write(ctx context.Context, in *WriteRequest, opts ...client.CallOption) (*WriteResponse, error)
	Delete(ctx context.Context, in *DeleteRequest, opts ...client.CallOption) (*DeleteResponse, error)
	List(ctx context.Context, in *ListRequest, opts ...client.CallOption) (Store_ListService, error)
	Databases(ctx context.Context, in *DatabasesRequest, opts ...client.CallOption) (*DatabasesResponse, error)
	Tables(ctx context.Context, in *TablesRequest, opts ...client.CallOption) (*TablesResponse, error)
}

func NewStoreService

func NewStoreService(name string, c client.Client) StoreService

type Store_ListService

type Store_ListService interface {
	Context() context.Context
	SendMsg(interface{}) error
	RecvMsg(interface{}) error
	Close() error
	Recv() (*ListResponse, error)
}

type Store_ListStream

type Store_ListStream interface {
	Context() context.Context
	SendMsg(interface{}) error
	RecvMsg(interface{}) error
	Close() error
	Send(*ListResponse) error
}

type TablesRequest

type TablesRequest struct {
	Database string `protobuf:"bytes,1,opt,name=database,proto3" json:"database,omitempty"`
	// contains filtered or unexported fields
}

func (*TablesRequest) Descriptor deprecated

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

Deprecated: Use TablesRequest.ProtoReflect.Descriptor instead.

func (*TablesRequest) GetDatabase

func (x *TablesRequest) GetDatabase() string

func (*TablesRequest) ProtoMessage

func (*TablesRequest) ProtoMessage()

func (*TablesRequest) ProtoReflect

func (x *TablesRequest) ProtoReflect() protoreflect.Message

func (*TablesRequest) Reset

func (x *TablesRequest) Reset()

func (*TablesRequest) String

func (x *TablesRequest) String() string

type TablesResponse

type TablesResponse struct {
	Tables []string `protobuf:"bytes,1,rep,name=tables,proto3" json:"tables,omitempty"`
	// contains filtered or unexported fields
}

func (*TablesResponse) Descriptor deprecated

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

Deprecated: Use TablesResponse.ProtoReflect.Descriptor instead.

func (*TablesResponse) GetTables

func (x *TablesResponse) GetTables() []string

func (*TablesResponse) ProtoMessage

func (*TablesResponse) ProtoMessage()

func (*TablesResponse) ProtoReflect

func (x *TablesResponse) ProtoReflect() protoreflect.Message

func (*TablesResponse) Reset

func (x *TablesResponse) Reset()

func (*TablesResponse) String

func (x *TablesResponse) String() string

type WriteOptions

type WriteOptions struct {
	Database string `protobuf:"bytes,1,opt,name=database,proto3" json:"database,omitempty"`
	Table    string `protobuf:"bytes,2,opt,name=table,proto3" json:"table,omitempty"`
	// time.Time
	Expiry int64 `protobuf:"varint,3,opt,name=expiry,proto3" json:"expiry,omitempty"`
	// time.Duration
	Ttl int64 `protobuf:"varint,4,opt,name=ttl,proto3" json:"ttl,omitempty"`
	// contains filtered or unexported fields
}

func (*WriteOptions) Descriptor deprecated

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

Deprecated: Use WriteOptions.ProtoReflect.Descriptor instead.

func (*WriteOptions) GetDatabase

func (x *WriteOptions) GetDatabase() string

func (*WriteOptions) GetExpiry

func (x *WriteOptions) GetExpiry() int64

func (*WriteOptions) GetTable

func (x *WriteOptions) GetTable() string

func (*WriteOptions) GetTtl

func (x *WriteOptions) GetTtl() int64

func (*WriteOptions) ProtoMessage

func (*WriteOptions) ProtoMessage()

func (*WriteOptions) ProtoReflect

func (x *WriteOptions) ProtoReflect() protoreflect.Message

func (*WriteOptions) Reset

func (x *WriteOptions) Reset()

func (*WriteOptions) String

func (x *WriteOptions) String() string

type WriteRequest

type WriteRequest struct {
	Record  *Record       `protobuf:"bytes,1,opt,name=record,proto3" json:"record,omitempty"`
	Options *WriteOptions `protobuf:"bytes,2,opt,name=options,proto3" json:"options,omitempty"`
	// contains filtered or unexported fields
}

func (*WriteRequest) Descriptor deprecated

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

Deprecated: Use WriteRequest.ProtoReflect.Descriptor instead.

func (*WriteRequest) GetOptions

func (x *WriteRequest) GetOptions() *WriteOptions

func (*WriteRequest) GetRecord

func (x *WriteRequest) GetRecord() *Record

func (*WriteRequest) ProtoMessage

func (*WriteRequest) ProtoMessage()

func (*WriteRequest) ProtoReflect

func (x *WriteRequest) ProtoReflect() protoreflect.Message

func (*WriteRequest) Reset

func (x *WriteRequest) Reset()

func (*WriteRequest) String

func (x *WriteRequest) String() string

type WriteResponse

type WriteResponse struct {
	// contains filtered or unexported fields
}

func (*WriteResponse) Descriptor deprecated

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

Deprecated: Use WriteResponse.ProtoReflect.Descriptor instead.

func (*WriteResponse) ProtoMessage

func (*WriteResponse) ProtoMessage()

func (*WriteResponse) ProtoReflect

func (x *WriteResponse) ProtoReflect() protoreflect.Message

func (*WriteResponse) Reset

func (x *WriteResponse) Reset()

func (*WriteResponse) String

func (x *WriteResponse) String() string

Jump to

Keyboard shortcuts

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