Add Databases and Tables endpoints to store RPC proto (#1515)
* Add Databases and Tables to store RPC * add Database to TablesRequest
This commit is contained in:
parent
77f0abb0ba
commit
0a27a08184
@ -1,15 +1,11 @@
|
|||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// source: store/service/proto/store.proto
|
// source: store.proto
|
||||||
|
|
||||||
package go_micro_store
|
package go_micro_store
|
||||||
|
|
||||||
import (
|
import (
|
||||||
context "context"
|
|
||||||
fmt "fmt"
|
fmt "fmt"
|
||||||
proto "github.com/golang/protobuf/proto"
|
proto "github.com/golang/protobuf/proto"
|
||||||
grpc "google.golang.org/grpc"
|
|
||||||
codes "google.golang.org/grpc/codes"
|
|
||||||
status "google.golang.org/grpc/status"
|
|
||||||
math "math"
|
math "math"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -40,7 +36,7 @@ func (m *Record) Reset() { *m = Record{} }
|
|||||||
func (m *Record) String() string { return proto.CompactTextString(m) }
|
func (m *Record) String() string { return proto.CompactTextString(m) }
|
||||||
func (*Record) ProtoMessage() {}
|
func (*Record) ProtoMessage() {}
|
||||||
func (*Record) Descriptor() ([]byte, []int) {
|
func (*Record) Descriptor() ([]byte, []int) {
|
||||||
return fileDescriptor_1ba364858f5c3cdb, []int{0}
|
return fileDescriptor_98bbca36ef968dfc, []int{0}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Record) XXX_Unmarshal(b []byte) error {
|
func (m *Record) XXX_Unmarshal(b []byte) error {
|
||||||
@ -96,7 +92,7 @@ func (m *ReadOptions) Reset() { *m = ReadOptions{} }
|
|||||||
func (m *ReadOptions) String() string { return proto.CompactTextString(m) }
|
func (m *ReadOptions) String() string { return proto.CompactTextString(m) }
|
||||||
func (*ReadOptions) ProtoMessage() {}
|
func (*ReadOptions) ProtoMessage() {}
|
||||||
func (*ReadOptions) Descriptor() ([]byte, []int) {
|
func (*ReadOptions) Descriptor() ([]byte, []int) {
|
||||||
return fileDescriptor_1ba364858f5c3cdb, []int{1}
|
return fileDescriptor_98bbca36ef968dfc, []int{1}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *ReadOptions) XXX_Unmarshal(b []byte) error {
|
func (m *ReadOptions) XXX_Unmarshal(b []byte) error {
|
||||||
@ -157,7 +153,7 @@ func (m *ReadRequest) Reset() { *m = ReadRequest{} }
|
|||||||
func (m *ReadRequest) String() string { return proto.CompactTextString(m) }
|
func (m *ReadRequest) String() string { return proto.CompactTextString(m) }
|
||||||
func (*ReadRequest) ProtoMessage() {}
|
func (*ReadRequest) ProtoMessage() {}
|
||||||
func (*ReadRequest) Descriptor() ([]byte, []int) {
|
func (*ReadRequest) Descriptor() ([]byte, []int) {
|
||||||
return fileDescriptor_1ba364858f5c3cdb, []int{2}
|
return fileDescriptor_98bbca36ef968dfc, []int{2}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *ReadRequest) XXX_Unmarshal(b []byte) error {
|
func (m *ReadRequest) XXX_Unmarshal(b []byte) error {
|
||||||
@ -203,7 +199,7 @@ func (m *ReadResponse) Reset() { *m = ReadResponse{} }
|
|||||||
func (m *ReadResponse) String() string { return proto.CompactTextString(m) }
|
func (m *ReadResponse) String() string { return proto.CompactTextString(m) }
|
||||||
func (*ReadResponse) ProtoMessage() {}
|
func (*ReadResponse) ProtoMessage() {}
|
||||||
func (*ReadResponse) Descriptor() ([]byte, []int) {
|
func (*ReadResponse) Descriptor() ([]byte, []int) {
|
||||||
return fileDescriptor_1ba364858f5c3cdb, []int{3}
|
return fileDescriptor_98bbca36ef968dfc, []int{3}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *ReadResponse) XXX_Unmarshal(b []byte) error {
|
func (m *ReadResponse) XXX_Unmarshal(b []byte) error {
|
||||||
@ -245,7 +241,7 @@ func (m *WriteOptions) Reset() { *m = WriteOptions{} }
|
|||||||
func (m *WriteOptions) String() string { return proto.CompactTextString(m) }
|
func (m *WriteOptions) String() string { return proto.CompactTextString(m) }
|
||||||
func (*WriteOptions) ProtoMessage() {}
|
func (*WriteOptions) ProtoMessage() {}
|
||||||
func (*WriteOptions) Descriptor() ([]byte, []int) {
|
func (*WriteOptions) Descriptor() ([]byte, []int) {
|
||||||
return fileDescriptor_1ba364858f5c3cdb, []int{4}
|
return fileDescriptor_98bbca36ef968dfc, []int{4}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *WriteOptions) XXX_Unmarshal(b []byte) error {
|
func (m *WriteOptions) XXX_Unmarshal(b []byte) error {
|
||||||
@ -292,7 +288,7 @@ func (m *WriteRequest) Reset() { *m = WriteRequest{} }
|
|||||||
func (m *WriteRequest) String() string { return proto.CompactTextString(m) }
|
func (m *WriteRequest) String() string { return proto.CompactTextString(m) }
|
||||||
func (*WriteRequest) ProtoMessage() {}
|
func (*WriteRequest) ProtoMessage() {}
|
||||||
func (*WriteRequest) Descriptor() ([]byte, []int) {
|
func (*WriteRequest) Descriptor() ([]byte, []int) {
|
||||||
return fileDescriptor_1ba364858f5c3cdb, []int{5}
|
return fileDescriptor_98bbca36ef968dfc, []int{5}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *WriteRequest) XXX_Unmarshal(b []byte) error {
|
func (m *WriteRequest) XXX_Unmarshal(b []byte) error {
|
||||||
@ -337,7 +333,7 @@ func (m *WriteResponse) Reset() { *m = WriteResponse{} }
|
|||||||
func (m *WriteResponse) String() string { return proto.CompactTextString(m) }
|
func (m *WriteResponse) String() string { return proto.CompactTextString(m) }
|
||||||
func (*WriteResponse) ProtoMessage() {}
|
func (*WriteResponse) ProtoMessage() {}
|
||||||
func (*WriteResponse) Descriptor() ([]byte, []int) {
|
func (*WriteResponse) Descriptor() ([]byte, []int) {
|
||||||
return fileDescriptor_1ba364858f5c3cdb, []int{6}
|
return fileDescriptor_98bbca36ef968dfc, []int{6}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *WriteResponse) XXX_Unmarshal(b []byte) error {
|
func (m *WriteResponse) XXX_Unmarshal(b []byte) error {
|
||||||
@ -368,7 +364,7 @@ func (m *DeleteOptions) Reset() { *m = DeleteOptions{} }
|
|||||||
func (m *DeleteOptions) String() string { return proto.CompactTextString(m) }
|
func (m *DeleteOptions) String() string { return proto.CompactTextString(m) }
|
||||||
func (*DeleteOptions) ProtoMessage() {}
|
func (*DeleteOptions) ProtoMessage() {}
|
||||||
func (*DeleteOptions) Descriptor() ([]byte, []int) {
|
func (*DeleteOptions) Descriptor() ([]byte, []int) {
|
||||||
return fileDescriptor_1ba364858f5c3cdb, []int{7}
|
return fileDescriptor_98bbca36ef968dfc, []int{7}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *DeleteOptions) XXX_Unmarshal(b []byte) error {
|
func (m *DeleteOptions) XXX_Unmarshal(b []byte) error {
|
||||||
@ -401,7 +397,7 @@ func (m *DeleteRequest) Reset() { *m = DeleteRequest{} }
|
|||||||
func (m *DeleteRequest) String() string { return proto.CompactTextString(m) }
|
func (m *DeleteRequest) String() string { return proto.CompactTextString(m) }
|
||||||
func (*DeleteRequest) ProtoMessage() {}
|
func (*DeleteRequest) ProtoMessage() {}
|
||||||
func (*DeleteRequest) Descriptor() ([]byte, []int) {
|
func (*DeleteRequest) Descriptor() ([]byte, []int) {
|
||||||
return fileDescriptor_1ba364858f5c3cdb, []int{8}
|
return fileDescriptor_98bbca36ef968dfc, []int{8}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *DeleteRequest) XXX_Unmarshal(b []byte) error {
|
func (m *DeleteRequest) XXX_Unmarshal(b []byte) error {
|
||||||
@ -446,7 +442,7 @@ func (m *DeleteResponse) Reset() { *m = DeleteResponse{} }
|
|||||||
func (m *DeleteResponse) String() string { return proto.CompactTextString(m) }
|
func (m *DeleteResponse) String() string { return proto.CompactTextString(m) }
|
||||||
func (*DeleteResponse) ProtoMessage() {}
|
func (*DeleteResponse) ProtoMessage() {}
|
||||||
func (*DeleteResponse) Descriptor() ([]byte, []int) {
|
func (*DeleteResponse) Descriptor() ([]byte, []int) {
|
||||||
return fileDescriptor_1ba364858f5c3cdb, []int{9}
|
return fileDescriptor_98bbca36ef968dfc, []int{9}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *DeleteResponse) XXX_Unmarshal(b []byte) error {
|
func (m *DeleteResponse) XXX_Unmarshal(b []byte) error {
|
||||||
@ -481,7 +477,7 @@ func (m *ListOptions) Reset() { *m = ListOptions{} }
|
|||||||
func (m *ListOptions) String() string { return proto.CompactTextString(m) }
|
func (m *ListOptions) String() string { return proto.CompactTextString(m) }
|
||||||
func (*ListOptions) ProtoMessage() {}
|
func (*ListOptions) ProtoMessage() {}
|
||||||
func (*ListOptions) Descriptor() ([]byte, []int) {
|
func (*ListOptions) Descriptor() ([]byte, []int) {
|
||||||
return fileDescriptor_1ba364858f5c3cdb, []int{10}
|
return fileDescriptor_98bbca36ef968dfc, []int{10}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *ListOptions) XXX_Unmarshal(b []byte) error {
|
func (m *ListOptions) XXX_Unmarshal(b []byte) error {
|
||||||
@ -541,7 +537,7 @@ func (m *ListRequest) Reset() { *m = ListRequest{} }
|
|||||||
func (m *ListRequest) String() string { return proto.CompactTextString(m) }
|
func (m *ListRequest) String() string { return proto.CompactTextString(m) }
|
||||||
func (*ListRequest) ProtoMessage() {}
|
func (*ListRequest) ProtoMessage() {}
|
||||||
func (*ListRequest) Descriptor() ([]byte, []int) {
|
func (*ListRequest) Descriptor() ([]byte, []int) {
|
||||||
return fileDescriptor_1ba364858f5c3cdb, []int{11}
|
return fileDescriptor_98bbca36ef968dfc, []int{11}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *ListRequest) XXX_Unmarshal(b []byte) error {
|
func (m *ListRequest) XXX_Unmarshal(b []byte) error {
|
||||||
@ -580,7 +576,7 @@ func (m *ListResponse) Reset() { *m = ListResponse{} }
|
|||||||
func (m *ListResponse) String() string { return proto.CompactTextString(m) }
|
func (m *ListResponse) String() string { return proto.CompactTextString(m) }
|
||||||
func (*ListResponse) ProtoMessage() {}
|
func (*ListResponse) ProtoMessage() {}
|
||||||
func (*ListResponse) Descriptor() ([]byte, []int) {
|
func (*ListResponse) Descriptor() ([]byte, []int) {
|
||||||
return fileDescriptor_1ba364858f5c3cdb, []int{12}
|
return fileDescriptor_98bbca36ef968dfc, []int{12}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *ListResponse) XXX_Unmarshal(b []byte) error {
|
func (m *ListResponse) XXX_Unmarshal(b []byte) error {
|
||||||
@ -608,6 +604,154 @@ func (m *ListResponse) GetKeys() []string {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type DatabasesRequest struct {
|
||||||
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||||
|
XXX_unrecognized []byte `json:"-"`
|
||||||
|
XXX_sizecache int32 `json:"-"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *DatabasesRequest) Reset() { *m = DatabasesRequest{} }
|
||||||
|
func (m *DatabasesRequest) String() string { return proto.CompactTextString(m) }
|
||||||
|
func (*DatabasesRequest) ProtoMessage() {}
|
||||||
|
func (*DatabasesRequest) Descriptor() ([]byte, []int) {
|
||||||
|
return fileDescriptor_98bbca36ef968dfc, []int{13}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *DatabasesRequest) XXX_Unmarshal(b []byte) error {
|
||||||
|
return xxx_messageInfo_DatabasesRequest.Unmarshal(m, b)
|
||||||
|
}
|
||||||
|
func (m *DatabasesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||||
|
return xxx_messageInfo_DatabasesRequest.Marshal(b, m, deterministic)
|
||||||
|
}
|
||||||
|
func (m *DatabasesRequest) XXX_Merge(src proto.Message) {
|
||||||
|
xxx_messageInfo_DatabasesRequest.Merge(m, src)
|
||||||
|
}
|
||||||
|
func (m *DatabasesRequest) XXX_Size() int {
|
||||||
|
return xxx_messageInfo_DatabasesRequest.Size(m)
|
||||||
|
}
|
||||||
|
func (m *DatabasesRequest) XXX_DiscardUnknown() {
|
||||||
|
xxx_messageInfo_DatabasesRequest.DiscardUnknown(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
var xxx_messageInfo_DatabasesRequest proto.InternalMessageInfo
|
||||||
|
|
||||||
|
type DatabasesResponse struct {
|
||||||
|
Databases []string `protobuf:"bytes,1,rep,name=databases,proto3" json:"databases,omitempty"`
|
||||||
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||||
|
XXX_unrecognized []byte `json:"-"`
|
||||||
|
XXX_sizecache int32 `json:"-"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *DatabasesResponse) Reset() { *m = DatabasesResponse{} }
|
||||||
|
func (m *DatabasesResponse) String() string { return proto.CompactTextString(m) }
|
||||||
|
func (*DatabasesResponse) ProtoMessage() {}
|
||||||
|
func (*DatabasesResponse) Descriptor() ([]byte, []int) {
|
||||||
|
return fileDescriptor_98bbca36ef968dfc, []int{14}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *DatabasesResponse) XXX_Unmarshal(b []byte) error {
|
||||||
|
return xxx_messageInfo_DatabasesResponse.Unmarshal(m, b)
|
||||||
|
}
|
||||||
|
func (m *DatabasesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||||
|
return xxx_messageInfo_DatabasesResponse.Marshal(b, m, deterministic)
|
||||||
|
}
|
||||||
|
func (m *DatabasesResponse) XXX_Merge(src proto.Message) {
|
||||||
|
xxx_messageInfo_DatabasesResponse.Merge(m, src)
|
||||||
|
}
|
||||||
|
func (m *DatabasesResponse) XXX_Size() int {
|
||||||
|
return xxx_messageInfo_DatabasesResponse.Size(m)
|
||||||
|
}
|
||||||
|
func (m *DatabasesResponse) XXX_DiscardUnknown() {
|
||||||
|
xxx_messageInfo_DatabasesResponse.DiscardUnknown(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
var xxx_messageInfo_DatabasesResponse proto.InternalMessageInfo
|
||||||
|
|
||||||
|
func (m *DatabasesResponse) GetDatabases() []string {
|
||||||
|
if m != nil {
|
||||||
|
return m.Databases
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type TablesRequest struct {
|
||||||
|
Database string `protobuf:"bytes,1,opt,name=database,proto3" json:"database,omitempty"`
|
||||||
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||||
|
XXX_unrecognized []byte `json:"-"`
|
||||||
|
XXX_sizecache int32 `json:"-"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *TablesRequest) Reset() { *m = TablesRequest{} }
|
||||||
|
func (m *TablesRequest) String() string { return proto.CompactTextString(m) }
|
||||||
|
func (*TablesRequest) ProtoMessage() {}
|
||||||
|
func (*TablesRequest) Descriptor() ([]byte, []int) {
|
||||||
|
return fileDescriptor_98bbca36ef968dfc, []int{15}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *TablesRequest) XXX_Unmarshal(b []byte) error {
|
||||||
|
return xxx_messageInfo_TablesRequest.Unmarshal(m, b)
|
||||||
|
}
|
||||||
|
func (m *TablesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||||
|
return xxx_messageInfo_TablesRequest.Marshal(b, m, deterministic)
|
||||||
|
}
|
||||||
|
func (m *TablesRequest) XXX_Merge(src proto.Message) {
|
||||||
|
xxx_messageInfo_TablesRequest.Merge(m, src)
|
||||||
|
}
|
||||||
|
func (m *TablesRequest) XXX_Size() int {
|
||||||
|
return xxx_messageInfo_TablesRequest.Size(m)
|
||||||
|
}
|
||||||
|
func (m *TablesRequest) XXX_DiscardUnknown() {
|
||||||
|
xxx_messageInfo_TablesRequest.DiscardUnknown(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
var xxx_messageInfo_TablesRequest proto.InternalMessageInfo
|
||||||
|
|
||||||
|
func (m *TablesRequest) GetDatabase() string {
|
||||||
|
if m != nil {
|
||||||
|
return m.Database
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
type TablesResponse struct {
|
||||||
|
Tables []string `protobuf:"bytes,1,rep,name=tables,proto3" json:"tables,omitempty"`
|
||||||
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||||
|
XXX_unrecognized []byte `json:"-"`
|
||||||
|
XXX_sizecache int32 `json:"-"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *TablesResponse) Reset() { *m = TablesResponse{} }
|
||||||
|
func (m *TablesResponse) String() string { return proto.CompactTextString(m) }
|
||||||
|
func (*TablesResponse) ProtoMessage() {}
|
||||||
|
func (*TablesResponse) Descriptor() ([]byte, []int) {
|
||||||
|
return fileDescriptor_98bbca36ef968dfc, []int{16}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *TablesResponse) XXX_Unmarshal(b []byte) error {
|
||||||
|
return xxx_messageInfo_TablesResponse.Unmarshal(m, b)
|
||||||
|
}
|
||||||
|
func (m *TablesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||||
|
return xxx_messageInfo_TablesResponse.Marshal(b, m, deterministic)
|
||||||
|
}
|
||||||
|
func (m *TablesResponse) XXX_Merge(src proto.Message) {
|
||||||
|
xxx_messageInfo_TablesResponse.Merge(m, src)
|
||||||
|
}
|
||||||
|
func (m *TablesResponse) XXX_Size() int {
|
||||||
|
return xxx_messageInfo_TablesResponse.Size(m)
|
||||||
|
}
|
||||||
|
func (m *TablesResponse) XXX_DiscardUnknown() {
|
||||||
|
xxx_messageInfo_TablesResponse.DiscardUnknown(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
var xxx_messageInfo_TablesResponse proto.InternalMessageInfo
|
||||||
|
|
||||||
|
func (m *TablesResponse) GetTables() []string {
|
||||||
|
if m != nil {
|
||||||
|
return m.Tables
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
proto.RegisterType((*Record)(nil), "go.micro.store.Record")
|
proto.RegisterType((*Record)(nil), "go.micro.store.Record")
|
||||||
proto.RegisterType((*ReadOptions)(nil), "go.micro.store.ReadOptions")
|
proto.RegisterType((*ReadOptions)(nil), "go.micro.store.ReadOptions")
|
||||||
@ -622,256 +766,51 @@ func init() {
|
|||||||
proto.RegisterType((*ListOptions)(nil), "go.micro.store.ListOptions")
|
proto.RegisterType((*ListOptions)(nil), "go.micro.store.ListOptions")
|
||||||
proto.RegisterType((*ListRequest)(nil), "go.micro.store.ListRequest")
|
proto.RegisterType((*ListRequest)(nil), "go.micro.store.ListRequest")
|
||||||
proto.RegisterType((*ListResponse)(nil), "go.micro.store.ListResponse")
|
proto.RegisterType((*ListResponse)(nil), "go.micro.store.ListResponse")
|
||||||
|
proto.RegisterType((*DatabasesRequest)(nil), "go.micro.store.DatabasesRequest")
|
||||||
|
proto.RegisterType((*DatabasesResponse)(nil), "go.micro.store.DatabasesResponse")
|
||||||
|
proto.RegisterType((*TablesRequest)(nil), "go.micro.store.TablesRequest")
|
||||||
|
proto.RegisterType((*TablesResponse)(nil), "go.micro.store.TablesResponse")
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() { proto.RegisterFile("store/service/proto/store.proto", fileDescriptor_1ba364858f5c3cdb) }
|
func init() {
|
||||||
|
proto.RegisterFile("store.proto", fileDescriptor_98bbca36ef968dfc)
|
||||||
var fileDescriptor_1ba364858f5c3cdb = []byte{
|
|
||||||
// 474 bytes of a gzipped FileDescriptorProto
|
|
||||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0x5d, 0x6f, 0xd3, 0x30,
|
|
||||||
0x14, 0x9d, 0x9b, 0x34, 0x5b, 0x6f, 0xcb, 0xa8, 0x2c, 0x34, 0x45, 0xb0, 0x41, 0xe5, 0xa7, 0x3c,
|
|
||||||
0xa5, 0x53, 0x11, 0x1f, 0x8f, 0x48, 0x0c, 0x04, 0x08, 0x09, 0xc9, 0x48, 0x20, 0xf1, 0x36, 0xba,
|
|
||||||
0x5b, 0x64, 0xb5, 0x9b, 0x83, 0xed, 0x56, 0xeb, 0x1f, 0xe2, 0x77, 0x22, 0x7f, 0xb5, 0x69, 0x48,
|
|
||||||
0x5e, 0x78, 0xf3, 0xbd, 0xbe, 0x39, 0xe7, 0x9e, 0xe3, 0xa3, 0xc0, 0x33, 0x6d, 0xa4, 0xc2, 0xa9,
|
|
||||||
0x46, 0xb5, 0x11, 0x73, 0x9c, 0x56, 0x4a, 0x1a, 0x39, 0x75, 0xbd, 0xd2, 0x9d, 0xe9, 0xe9, 0x2f,
|
|
||||||
0x59, 0xde, 0x8a, 0xb9, 0x92, 0xa5, 0xeb, 0xb2, 0x0f, 0x90, 0x71, 0x9c, 0x4b, 0x75, 0x43, 0xc7,
|
|
||||||
0x90, 0x2c, 0x71, 0x9b, 0x93, 0x09, 0x29, 0x06, 0xdc, 0x1e, 0xe9, 0x23, 0xe8, 0x6f, 0xae, 0x57,
|
|
||||||
0x6b, 0xcc, 0x7b, 0x13, 0x52, 0x8c, 0xb8, 0x2f, 0xe8, 0x19, 0x64, 0x78, 0x5f, 0x09, 0xb5, 0xcd,
|
|
||||||
0x93, 0x09, 0x29, 0x12, 0x1e, 0x2a, 0xb6, 0x84, 0x21, 0xc7, 0xeb, 0x9b, 0x2f, 0x95, 0x11, 0xf2,
|
|
||||||
0x4e, 0xdb, 0xb1, 0x4a, 0xe1, 0x42, 0xdc, 0x3b, 0xc4, 0x13, 0x1e, 0x2a, 0xdb, 0xd7, 0xeb, 0x85,
|
|
||||||
0xed, 0xf7, 0x7c, 0xdf, 0x57, 0x96, 0x6c, 0x25, 0x6e, 0x85, 0x71, 0xa8, 0x29, 0xf7, 0x85, 0x9d,
|
|
||||||
0x96, 0x8b, 0x85, 0x46, 0x93, 0xa7, 0xae, 0x1d, 0x2a, 0xf6, 0xcd, 0x93, 0x71, 0xfc, 0xbd, 0x46,
|
|
||||||
0x6d, 0x5a, 0x76, 0x7f, 0x01, 0xc7, 0xd2, 0x6f, 0xe2, 0x78, 0x86, 0xb3, 0x27, 0xe5, 0xa1, 0xf2,
|
|
||||||
0xb2, 0xb6, 0x2c, 0x8f, 0xb3, 0xec, 0x0d, 0x8c, 0x3c, 0xae, 0xae, 0xe4, 0x9d, 0x46, 0x7a, 0x09,
|
|
||||||
0xc7, 0xca, 0xd9, 0xa3, 0x73, 0x32, 0x49, 0x8a, 0xe1, 0xec, 0xec, 0x5f, 0x18, 0x7b, 0xcd, 0xe3,
|
|
||||||
0x18, 0x7b, 0x0d, 0xa3, 0xef, 0x4a, 0x18, 0xac, 0xf9, 0x10, 0xec, 0x22, 0x75, 0xbb, 0xec, 0xca,
|
|
||||||
0xc6, 0xac, 0xdc, 0x72, 0x09, 0xb7, 0x47, 0xb6, 0x09, 0x5f, 0x46, 0x51, 0x25, 0x64, 0x1e, 0xd4,
|
|
||||||
0x7d, 0xd9, 0x4d, 0x1d, 0xa6, 0xe8, 0xcb, 0xa6, 0xe4, 0xf3, 0xe6, 0x07, 0xf5, 0xc5, 0xf6, 0x9a,
|
|
||||||
0x1f, 0xc2, 0x83, 0xc0, 0xeb, 0x45, 0xdb, 0xc6, 0x15, 0xae, 0x70, 0x37, 0xca, 0x7e, 0xc4, 0x46,
|
|
||||||
0xb7, 0xdf, 0xaf, 0x9a, 0xe4, 0x17, 0x4d, 0xf2, 0x03, 0xc8, 0x3d, 0xfb, 0x18, 0x4e, 0x23, 0x76,
|
|
||||||
0xa0, 0x5f, 0xc2, 0xf0, 0xb3, 0xd0, 0xa6, 0x3d, 0x48, 0x83, 0x8e, 0x20, 0x0d, 0xfe, 0x33, 0x48,
|
|
||||||
0x57, 0x9e, 0x2c, 0x0a, 0xab, 0xc5, 0x86, 0xb4, 0xc7, 0xa6, 0xb6, 0xda, 0x5e, 0x44, 0x01, 0x23,
|
|
||||||
0x8f, 0x12, 0x62, 0x43, 0x21, 0x5d, 0xe2, 0xd6, 0x5a, 0x91, 0x14, 0x03, 0xee, 0xce, 0x9f, 0xd2,
|
|
||||||
0x13, 0x32, 0xee, 0xcd, 0xfe, 0xf4, 0xa0, 0xff, 0xd5, 0x02, 0xd1, 0xb7, 0x90, 0xda, 0xa8, 0xd1,
|
|
||||||
0xd6, 0x60, 0x86, 0x7d, 0x1e, 0x9f, 0xb7, 0x5f, 0x06, 0xa7, 0x8e, 0xe8, 0x7b, 0xe8, 0xbb, 0xb7,
|
|
||||||
0xa3, 0xed, 0x6f, 0x1d, 0x61, 0x2e, 0x3a, 0x6e, 0x77, 0x38, 0x1f, 0x21, 0xf3, 0xaf, 0x40, 0x3b,
|
|
||||||
0xde, 0x2d, 0x22, 0x3d, 0xed, 0xba, 0xde, 0x41, 0xbd, 0x83, 0xd4, 0x7a, 0x41, 0x5b, 0x9d, 0xeb,
|
|
||||||
0xd4, 0x55, 0xb7, 0x8f, 0x1d, 0x5d, 0x92, 0x9f, 0x99, 0xfb, 0x5f, 0x3d, 0xff, 0x1b, 0x00, 0x00,
|
|
||||||
0xff, 0xff, 0xdd, 0xdb, 0x9c, 0x15, 0xd2, 0x04, 0x00, 0x00,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reference imports to suppress errors if they are not otherwise used.
|
var fileDescriptor_98bbca36ef968dfc = []byte{
|
||||||
var _ context.Context
|
// 552 bytes of a gzipped FileDescriptorProto
|
||||||
var _ grpc.ClientConn
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0x5d, 0x8b, 0xd3, 0x40,
|
||||||
|
0x14, 0x6d, 0x9a, 0x34, 0xdb, 0xdc, 0x76, 0x6b, 0x1d, 0xa4, 0x94, 0xda, 0x95, 0x38, 0x4f, 0x01,
|
||||||
// This is a compile-time assertion to ensure that this generated file
|
0x21, 0xac, 0x15, 0x3f, 0x1e, 0x05, 0xab, 0xa8, 0x08, 0xc2, 0x28, 0x0a, 0xbe, 0xa5, 0xdb, 0xa9,
|
||||||
// is compatible with the grpc package it is being compiled against.
|
0x84, 0x66, 0x77, 0x62, 0x66, 0xba, 0x6c, 0x7f, 0xa0, 0xff, 0x4b, 0xe6, 0x2b, 0x4d, 0xd3, 0xc4,
|
||||||
const _ = grpc.SupportPackageIsVersion4
|
0x87, 0x7d, 0x9b, 0x7b, 0xe7, 0xce, 0x39, 0xf7, 0xdc, 0x7b, 0x12, 0x18, 0x70, 0xc1, 0x0a, 0x1a,
|
||||||
|
0xe7, 0x05, 0x13, 0x0c, 0x8d, 0x7e, 0xb3, 0xf8, 0x3a, 0xbd, 0x2a, 0x58, 0xac, 0xb2, 0xf8, 0x23,
|
||||||
// StoreClient is the client API for Store service.
|
0xf8, 0x84, 0x5e, 0xb1, 0x62, 0x8d, 0xc6, 0xe0, 0x6e, 0xe9, 0x7e, 0xea, 0x84, 0x4e, 0x14, 0x10,
|
||||||
//
|
0x79, 0x44, 0x8f, 0xa0, 0x77, 0x9b, 0x64, 0x3b, 0x3a, 0xed, 0x86, 0x4e, 0x34, 0x24, 0x3a, 0x40,
|
||||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
0x13, 0xf0, 0xe9, 0x5d, 0x9e, 0x16, 0xfb, 0xa9, 0x1b, 0x3a, 0x91, 0x4b, 0x4c, 0x84, 0xb7, 0x30,
|
||||||
type StoreClient interface {
|
0x20, 0x34, 0x59, 0x7f, 0xcd, 0x45, 0xca, 0x6e, 0xb8, 0x2c, 0xcb, 0x0b, 0xba, 0x49, 0xef, 0x14,
|
||||||
Read(ctx context.Context, in *ReadRequest, opts ...grpc.CallOption) (*ReadResponse, error)
|
0x62, 0x9f, 0x98, 0x48, 0xe6, 0xf9, 0x6e, 0x23, 0xf3, 0x5d, 0x9d, 0xd7, 0x91, 0x24, 0xcb, 0xd2,
|
||||||
Write(ctx context.Context, in *WriteRequest, opts ...grpc.CallOption) (*WriteResponse, error)
|
0xeb, 0x54, 0x28, 0x54, 0x8f, 0xe8, 0x40, 0x56, 0xb3, 0xcd, 0x86, 0x53, 0x31, 0xf5, 0x54, 0xda,
|
||||||
Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error)
|
0x44, 0xf8, 0x87, 0x26, 0x23, 0xf4, 0xcf, 0x8e, 0x72, 0xd1, 0xd0, 0xfb, 0x4b, 0x38, 0x63, 0xba,
|
||||||
List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (Store_ListClient, error)
|
0x13, 0xc5, 0x33, 0x58, 0x3c, 0x8e, 0x8f, 0x95, 0xc7, 0x95, 0x66, 0x89, 0xad, 0xc5, 0x6f, 0x61,
|
||||||
}
|
0xa8, 0x71, 0x79, 0xce, 0x6e, 0x38, 0x45, 0x97, 0x70, 0x56, 0xa8, 0xf1, 0xf0, 0xa9, 0x13, 0xba,
|
||||||
|
0xd1, 0x60, 0x31, 0x39, 0x85, 0x91, 0xd7, 0xc4, 0x96, 0xe1, 0x37, 0x30, 0xfc, 0x59, 0xa4, 0x82,
|
||||||
type storeClient struct {
|
0x56, 0xe6, 0x60, 0xc6, 0xe5, 0x54, 0xc7, 0x25, 0x5b, 0x16, 0x22, 0x53, 0xcd, 0xb9, 0x44, 0x1e,
|
||||||
cc *grpc.ClientConn
|
0xf1, 0xad, 0x79, 0x69, 0x45, 0xc5, 0xe0, 0x6b, 0x50, 0xf5, 0xb2, 0x9d, 0xda, 0x54, 0xa1, 0x57,
|
||||||
}
|
0x75, 0xc9, 0xf3, 0xfa, 0x83, 0x6a, 0x63, 0x07, 0xcd, 0x0f, 0xe0, 0xdc, 0xf0, 0x6a, 0xd1, 0x32,
|
||||||
|
0xb1, 0xa4, 0x19, 0x2d, 0x4b, 0xf1, 0x2f, 0x9b, 0x68, 0x9f, 0xf7, 0xeb, 0x3a, 0xf9, 0x45, 0x9d,
|
||||||
func NewStoreClient(cc *grpc.ClientConn) StoreClient {
|
0xfc, 0x08, 0xf2, 0xc0, 0x3e, 0x86, 0x91, 0xc5, 0x36, 0xf4, 0x5b, 0x18, 0x7c, 0x49, 0xb9, 0x68,
|
||||||
return &storeClient{cc}
|
0x36, 0x52, 0xd0, 0x62, 0xa4, 0xe0, 0x9e, 0x46, 0x5a, 0x6a, 0x32, 0x2b, 0xac, 0x62, 0x1b, 0xa7,
|
||||||
}
|
0xd9, 0x36, 0x95, 0xd6, 0x0e, 0x22, 0x22, 0x18, 0x6a, 0x14, 0x63, 0x1b, 0x04, 0xde, 0x96, 0xee,
|
||||||
|
0xe5, 0x28, 0xdc, 0x28, 0x20, 0xea, 0xfc, 0xd9, 0xeb, 0x3b, 0xe3, 0x2e, 0x46, 0x30, 0x5e, 0x26,
|
||||||
func (c *storeClient) Read(ctx context.Context, in *ReadRequest, opts ...grpc.CallOption) (*ReadResponse, error) {
|
0x22, 0x59, 0x25, 0x9c, 0x72, 0x43, 0x8a, 0x9f, 0xc3, 0xc3, 0x4a, 0xce, 0x40, 0xcc, 0x21, 0x58,
|
||||||
out := new(ReadResponse)
|
0xdb, 0xa4, 0xf2, 0x5e, 0x40, 0x0e, 0x09, 0xfc, 0x0c, 0xce, 0xbf, 0x27, 0xab, 0xac, 0xc4, 0x40,
|
||||||
err := c.cc.Invoke(ctx, "/go.micro.store.Store/Read", in, out, opts...)
|
0x33, 0xe8, 0xdb, 0x5b, 0x33, 0xa7, 0x32, 0xc6, 0x11, 0x8c, 0x6c, 0xb1, 0x01, 0x9f, 0x80, 0x2f,
|
||||||
if err != nil {
|
0x54, 0xc6, 0x20, 0x9b, 0x68, 0xf1, 0xd7, 0x85, 0xde, 0x37, 0x29, 0x13, 0xbd, 0x03, 0x4f, 0x7e,
|
||||||
return nil, err
|
0x08, 0xa8, 0xf1, 0xb3, 0x31, 0xa4, 0xb3, 0x79, 0xf3, 0xa5, 0xd9, 0x63, 0x07, 0x7d, 0x80, 0x9e,
|
||||||
}
|
0x72, 0x16, 0x6a, 0x76, 0xa2, 0x85, 0xb9, 0x68, 0xb9, 0x2d, 0x71, 0x3e, 0x81, 0xaf, 0x3d, 0x82,
|
||||||
return out, nil
|
0x5a, 0x5c, 0x65, 0x91, 0x9e, 0xb4, 0x5d, 0x97, 0x50, 0xef, 0xc1, 0x93, 0x9b, 0x42, 0x8d, 0x7b,
|
||||||
}
|
0x6d, 0xd5, 0x55, 0x5d, 0x2e, 0xee, 0x5c, 0x3a, 0x88, 0x40, 0x50, 0xae, 0x0c, 0x85, 0x27, 0xac,
|
||||||
|
0xb5, 0x0d, 0xcf, 0x9e, 0xfe, 0xa7, 0xa2, 0xaa, 0x52, 0xaf, 0xe9, 0x54, 0xe5, 0xd1, 0xae, 0x4f,
|
||||||
func (c *storeClient) Write(ctx context.Context, in *WriteRequest, opts ...grpc.CallOption) (*WriteResponse, error) {
|
0x55, 0x1e, 0x6f, 0x17, 0x77, 0x56, 0xbe, 0xfa, 0xd9, 0xbf, 0xf8, 0x17, 0x00, 0x00, 0xff, 0xff,
|
||||||
out := new(WriteResponse)
|
0x18, 0xa5, 0x9b, 0x82, 0xfb, 0x05, 0x00, 0x00,
|
||||||
err := c.cc.Invoke(ctx, "/go.micro.store.Store/Write", in, out, opts...)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return out, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *storeClient) Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error) {
|
|
||||||
out := new(DeleteResponse)
|
|
||||||
err := c.cc.Invoke(ctx, "/go.micro.store.Store/Delete", in, out, opts...)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return out, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *storeClient) List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (Store_ListClient, error) {
|
|
||||||
stream, err := c.cc.NewStream(ctx, &_Store_serviceDesc.Streams[0], "/go.micro.store.Store/List", opts...)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
x := &storeListClient{stream}
|
|
||||||
if err := x.ClientStream.SendMsg(in); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
if err := x.ClientStream.CloseSend(); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return x, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
type Store_ListClient interface {
|
|
||||||
Recv() (*ListResponse, error)
|
|
||||||
grpc.ClientStream
|
|
||||||
}
|
|
||||||
|
|
||||||
type storeListClient struct {
|
|
||||||
grpc.ClientStream
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *storeListClient) Recv() (*ListResponse, error) {
|
|
||||||
m := new(ListResponse)
|
|
||||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return m, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// StoreServer is the server API for Store service.
|
|
||||||
type StoreServer interface {
|
|
||||||
Read(context.Context, *ReadRequest) (*ReadResponse, error)
|
|
||||||
Write(context.Context, *WriteRequest) (*WriteResponse, error)
|
|
||||||
Delete(context.Context, *DeleteRequest) (*DeleteResponse, error)
|
|
||||||
List(*ListRequest, Store_ListServer) error
|
|
||||||
}
|
|
||||||
|
|
||||||
// UnimplementedStoreServer can be embedded to have forward compatible implementations.
|
|
||||||
type UnimplementedStoreServer struct {
|
|
||||||
}
|
|
||||||
|
|
||||||
func (*UnimplementedStoreServer) Read(ctx context.Context, req *ReadRequest) (*ReadResponse, error) {
|
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method Read not implemented")
|
|
||||||
}
|
|
||||||
func (*UnimplementedStoreServer) Write(ctx context.Context, req *WriteRequest) (*WriteResponse, error) {
|
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method Write not implemented")
|
|
||||||
}
|
|
||||||
func (*UnimplementedStoreServer) Delete(ctx context.Context, req *DeleteRequest) (*DeleteResponse, error) {
|
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
|
|
||||||
}
|
|
||||||
func (*UnimplementedStoreServer) List(req *ListRequest, srv Store_ListServer) error {
|
|
||||||
return status.Errorf(codes.Unimplemented, "method List not implemented")
|
|
||||||
}
|
|
||||||
|
|
||||||
func RegisterStoreServer(s *grpc.Server, srv StoreServer) {
|
|
||||||
s.RegisterService(&_Store_serviceDesc, srv)
|
|
||||||
}
|
|
||||||
|
|
||||||
func _Store_Read_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
||||||
in := new(ReadRequest)
|
|
||||||
if err := dec(in); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
if interceptor == nil {
|
|
||||||
return srv.(StoreServer).Read(ctx, in)
|
|
||||||
}
|
|
||||||
info := &grpc.UnaryServerInfo{
|
|
||||||
Server: srv,
|
|
||||||
FullMethod: "/go.micro.store.Store/Read",
|
|
||||||
}
|
|
||||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
||||||
return srv.(StoreServer).Read(ctx, req.(*ReadRequest))
|
|
||||||
}
|
|
||||||
return interceptor(ctx, in, info, handler)
|
|
||||||
}
|
|
||||||
|
|
||||||
func _Store_Write_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
||||||
in := new(WriteRequest)
|
|
||||||
if err := dec(in); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
if interceptor == nil {
|
|
||||||
return srv.(StoreServer).Write(ctx, in)
|
|
||||||
}
|
|
||||||
info := &grpc.UnaryServerInfo{
|
|
||||||
Server: srv,
|
|
||||||
FullMethod: "/go.micro.store.Store/Write",
|
|
||||||
}
|
|
||||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
||||||
return srv.(StoreServer).Write(ctx, req.(*WriteRequest))
|
|
||||||
}
|
|
||||||
return interceptor(ctx, in, info, handler)
|
|
||||||
}
|
|
||||||
|
|
||||||
func _Store_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
||||||
in := new(DeleteRequest)
|
|
||||||
if err := dec(in); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
if interceptor == nil {
|
|
||||||
return srv.(StoreServer).Delete(ctx, in)
|
|
||||||
}
|
|
||||||
info := &grpc.UnaryServerInfo{
|
|
||||||
Server: srv,
|
|
||||||
FullMethod: "/go.micro.store.Store/Delete",
|
|
||||||
}
|
|
||||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
||||||
return srv.(StoreServer).Delete(ctx, req.(*DeleteRequest))
|
|
||||||
}
|
|
||||||
return interceptor(ctx, in, info, handler)
|
|
||||||
}
|
|
||||||
|
|
||||||
func _Store_List_Handler(srv interface{}, stream grpc.ServerStream) error {
|
|
||||||
m := new(ListRequest)
|
|
||||||
if err := stream.RecvMsg(m); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
return srv.(StoreServer).List(m, &storeListServer{stream})
|
|
||||||
}
|
|
||||||
|
|
||||||
type Store_ListServer interface {
|
|
||||||
Send(*ListResponse) error
|
|
||||||
grpc.ServerStream
|
|
||||||
}
|
|
||||||
|
|
||||||
type storeListServer struct {
|
|
||||||
grpc.ServerStream
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *storeListServer) Send(m *ListResponse) error {
|
|
||||||
return x.ServerStream.SendMsg(m)
|
|
||||||
}
|
|
||||||
|
|
||||||
var _Store_serviceDesc = grpc.ServiceDesc{
|
|
||||||
ServiceName: "go.micro.store.Store",
|
|
||||||
HandlerType: (*StoreServer)(nil),
|
|
||||||
Methods: []grpc.MethodDesc{
|
|
||||||
{
|
|
||||||
MethodName: "Read",
|
|
||||||
Handler: _Store_Read_Handler,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
MethodName: "Write",
|
|
||||||
Handler: _Store_Write_Handler,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
MethodName: "Delete",
|
|
||||||
Handler: _Store_Delete_Handler,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
Streams: []grpc.StreamDesc{
|
|
||||||
{
|
|
||||||
StreamName: "List",
|
|
||||||
Handler: _Store_List_Handler,
|
|
||||||
ServerStreams: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
Metadata: "store/service/proto/store.proto",
|
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// Code generated by protoc-gen-micro. DO NOT EDIT.
|
// Code generated by protoc-gen-micro. DO NOT EDIT.
|
||||||
// source: store/service/proto/store.proto
|
// source: store.proto
|
||||||
|
|
||||||
package go_micro_store
|
package go_micro_store
|
||||||
|
|
||||||
@ -38,6 +38,8 @@ type StoreService interface {
|
|||||||
Write(ctx context.Context, in *WriteRequest, opts ...client.CallOption) (*WriteResponse, error)
|
Write(ctx context.Context, in *WriteRequest, opts ...client.CallOption) (*WriteResponse, error)
|
||||||
Delete(ctx context.Context, in *DeleteRequest, opts ...client.CallOption) (*DeleteResponse, error)
|
Delete(ctx context.Context, in *DeleteRequest, opts ...client.CallOption) (*DeleteResponse, error)
|
||||||
List(ctx context.Context, in *ListRequest, opts ...client.CallOption) (Store_ListService, 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)
|
||||||
}
|
}
|
||||||
|
|
||||||
type storeService struct {
|
type storeService struct {
|
||||||
@ -131,6 +133,26 @@ func (x *storeServiceList) Recv() (*ListResponse, error) {
|
|||||||
return m, nil
|
return m, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *storeService) Databases(ctx context.Context, in *DatabasesRequest, opts ...client.CallOption) (*DatabasesResponse, error) {
|
||||||
|
req := c.c.NewRequest(c.name, "Store.Databases", in)
|
||||||
|
out := new(DatabasesResponse)
|
||||||
|
err := c.c.Call(ctx, req, out, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *storeService) Tables(ctx context.Context, in *TablesRequest, opts ...client.CallOption) (*TablesResponse, error) {
|
||||||
|
req := c.c.NewRequest(c.name, "Store.Tables", in)
|
||||||
|
out := new(TablesResponse)
|
||||||
|
err := c.c.Call(ctx, req, out, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
// Server API for Store service
|
// Server API for Store service
|
||||||
|
|
||||||
type StoreHandler interface {
|
type StoreHandler interface {
|
||||||
@ -138,6 +160,8 @@ type StoreHandler interface {
|
|||||||
Write(context.Context, *WriteRequest, *WriteResponse) error
|
Write(context.Context, *WriteRequest, *WriteResponse) error
|
||||||
Delete(context.Context, *DeleteRequest, *DeleteResponse) error
|
Delete(context.Context, *DeleteRequest, *DeleteResponse) error
|
||||||
List(context.Context, *ListRequest, Store_ListStream) error
|
List(context.Context, *ListRequest, Store_ListStream) error
|
||||||
|
Databases(context.Context, *DatabasesRequest, *DatabasesResponse) error
|
||||||
|
Tables(context.Context, *TablesRequest, *TablesResponse) error
|
||||||
}
|
}
|
||||||
|
|
||||||
func RegisterStoreHandler(s server.Server, hdlr StoreHandler, opts ...server.HandlerOption) error {
|
func RegisterStoreHandler(s server.Server, hdlr StoreHandler, opts ...server.HandlerOption) error {
|
||||||
@ -146,6 +170,8 @@ func RegisterStoreHandler(s server.Server, hdlr StoreHandler, opts ...server.Han
|
|||||||
Write(ctx context.Context, in *WriteRequest, out *WriteResponse) error
|
Write(ctx context.Context, in *WriteRequest, out *WriteResponse) error
|
||||||
Delete(ctx context.Context, in *DeleteRequest, out *DeleteResponse) error
|
Delete(ctx context.Context, in *DeleteRequest, out *DeleteResponse) error
|
||||||
List(ctx context.Context, stream server.Stream) error
|
List(ctx context.Context, stream server.Stream) error
|
||||||
|
Databases(ctx context.Context, in *DatabasesRequest, out *DatabasesResponse) error
|
||||||
|
Tables(ctx context.Context, in *TablesRequest, out *TablesResponse) error
|
||||||
}
|
}
|
||||||
type Store struct {
|
type Store struct {
|
||||||
store
|
store
|
||||||
@ -209,3 +235,11 @@ func (x *storeListStream) RecvMsg(m interface{}) error {
|
|||||||
func (x *storeListStream) Send(m *ListResponse) error {
|
func (x *storeListStream) Send(m *ListResponse) error {
|
||||||
return x.stream.Send(m)
|
return x.stream.Send(m)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (h *storeHandler) Databases(ctx context.Context, in *DatabasesRequest, out *DatabasesResponse) error {
|
||||||
|
return h.StoreHandler.Databases(ctx, in, out)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (h *storeHandler) Tables(ctx context.Context, in *TablesRequest, out *TablesResponse) error {
|
||||||
|
return h.StoreHandler.Tables(ctx, in, out)
|
||||||
|
}
|
||||||
|
@ -7,6 +7,8 @@ service Store {
|
|||||||
rpc Write(WriteRequest) returns (WriteResponse) {};
|
rpc Write(WriteRequest) returns (WriteResponse) {};
|
||||||
rpc Delete(DeleteRequest) returns (DeleteResponse) {};
|
rpc Delete(DeleteRequest) returns (DeleteResponse) {};
|
||||||
rpc List(ListRequest) returns (stream ListResponse) {};
|
rpc List(ListRequest) returns (stream ListResponse) {};
|
||||||
|
rpc Databases(DatabasesRequest) returns (DatabasesResponse) {};
|
||||||
|
rpc Tables(TablesRequest) returns (TablesResponse) {};
|
||||||
}
|
}
|
||||||
|
|
||||||
message Record {
|
message Record {
|
||||||
@ -72,3 +74,17 @@ message ListResponse {
|
|||||||
reserved 1; //repeated Record records = 1;
|
reserved 1; //repeated Record records = 1;
|
||||||
repeated string keys = 2;
|
repeated string keys = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message DatabasesRequest {}
|
||||||
|
|
||||||
|
message DatabasesResponse {
|
||||||
|
repeated string databases = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message TablesRequest {
|
||||||
|
string database = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message TablesResponse {
|
||||||
|
repeated string tables = 1;
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user