Implement a reverse proxy using grpc-gateway
This commit is contained in:
parent
7ababb79f6
commit
8c6230ca20
22 changed files with 3122 additions and 802 deletions
|
@ -1,316 +1,505 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// source: accounts.proto
|
||||
// versions:
|
||||
// protoc-gen-go v1.23.0
|
||||
// protoc v3.6.1
|
||||
// source: accounts/accounts.proto
|
||||
|
||||
package accounts
|
||||
|
||||
import (
|
||||
context "context"
|
||||
fmt "fmt"
|
||||
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"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the proto package it is being compiled against.
|
||||
// A compilation error at this line likely means your copy of the
|
||||
// proto package needs to be updated.
|
||||
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||
// This is a compile-time assertion that a sufficiently up-to-date version
|
||||
// of the legacy proto package is being used.
|
||||
const _ = proto.ProtoPackageIsVersion4
|
||||
|
||||
// RegisterInfo contains the information needed to register an account
|
||||
type RegisterInfo struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// The name for the account, must be unique
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
}
|
||||
|
||||
func (m *RegisterInfo) Reset() { *m = RegisterInfo{} }
|
||||
func (m *RegisterInfo) String() string { return proto.CompactTextString(m) }
|
||||
func (*RegisterInfo) ProtoMessage() {}
|
||||
func (x *RegisterInfo) Reset() {
|
||||
*x = RegisterInfo{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_accounts_accounts_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *RegisterInfo) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*RegisterInfo) ProtoMessage() {}
|
||||
|
||||
func (x *RegisterInfo) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_accounts_accounts_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use RegisterInfo.ProtoReflect.Descriptor instead.
|
||||
func (*RegisterInfo) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_e1e7723af4c007b7, []int{0}
|
||||
return file_accounts_accounts_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (m *RegisterInfo) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_RegisterInfo.Unmarshal(m, b)
|
||||
}
|
||||
func (m *RegisterInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_RegisterInfo.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *RegisterInfo) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_RegisterInfo.Merge(m, src)
|
||||
}
|
||||
func (m *RegisterInfo) XXX_Size() int {
|
||||
return xxx_messageInfo_RegisterInfo.Size(m)
|
||||
}
|
||||
func (m *RegisterInfo) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_RegisterInfo.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_RegisterInfo proto.InternalMessageInfo
|
||||
|
||||
func (m *RegisterInfo) GetName() string {
|
||||
if m != nil {
|
||||
return m.Name
|
||||
func (x *RegisterInfo) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// RegisterResponse is the response information from registering an account
|
||||
type RegisterResponse struct {
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (m *RegisterResponse) Reset() { *m = RegisterResponse{} }
|
||||
func (m *RegisterResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*RegisterResponse) ProtoMessage() {}
|
||||
func (x *RegisterResponse) Reset() {
|
||||
*x = RegisterResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_accounts_accounts_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *RegisterResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*RegisterResponse) ProtoMessage() {}
|
||||
|
||||
func (x *RegisterResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_accounts_accounts_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use RegisterResponse.ProtoReflect.Descriptor instead.
|
||||
func (*RegisterResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_e1e7723af4c007b7, []int{1}
|
||||
return file_accounts_accounts_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (m *RegisterResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_RegisterResponse.Unmarshal(m, b)
|
||||
}
|
||||
func (m *RegisterResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_RegisterResponse.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *RegisterResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_RegisterResponse.Merge(m, src)
|
||||
}
|
||||
func (m *RegisterResponse) XXX_Size() int {
|
||||
return xxx_messageInfo_RegisterResponse.Size(m)
|
||||
}
|
||||
func (m *RegisterResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_RegisterResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_RegisterResponse proto.InternalMessageInfo
|
||||
|
||||
// DataKeyValue represents a simple key value pair to assign to an account
|
||||
type DataKeyValue struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// The account to assign the new key value pair to
|
||||
Account string `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"`
|
||||
// The key value pair to assign
|
||||
Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
|
||||
Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
|
||||
Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
|
||||
}
|
||||
|
||||
func (m *DataKeyValue) Reset() { *m = DataKeyValue{} }
|
||||
func (m *DataKeyValue) String() string { return proto.CompactTextString(m) }
|
||||
func (*DataKeyValue) ProtoMessage() {}
|
||||
func (x *DataKeyValue) Reset() {
|
||||
*x = DataKeyValue{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_accounts_accounts_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *DataKeyValue) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DataKeyValue) ProtoMessage() {}
|
||||
|
||||
func (x *DataKeyValue) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_accounts_accounts_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use DataKeyValue.ProtoReflect.Descriptor instead.
|
||||
func (*DataKeyValue) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_e1e7723af4c007b7, []int{2}
|
||||
return file_accounts_accounts_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (m *DataKeyValue) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_DataKeyValue.Unmarshal(m, b)
|
||||
}
|
||||
func (m *DataKeyValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_DataKeyValue.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *DataKeyValue) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_DataKeyValue.Merge(m, src)
|
||||
}
|
||||
func (m *DataKeyValue) XXX_Size() int {
|
||||
return xxx_messageInfo_DataKeyValue.Size(m)
|
||||
}
|
||||
func (m *DataKeyValue) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_DataKeyValue.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_DataKeyValue proto.InternalMessageInfo
|
||||
|
||||
func (m *DataKeyValue) GetAccount() string {
|
||||
if m != nil {
|
||||
return m.Account
|
||||
func (x *DataKeyValue) GetAccount() string {
|
||||
if x != nil {
|
||||
return x.Account
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *DataKeyValue) GetKey() string {
|
||||
if m != nil {
|
||||
return m.Key
|
||||
func (x *DataKeyValue) GetKey() string {
|
||||
if x != nil {
|
||||
return x.Key
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *DataKeyValue) GetValue() string {
|
||||
if m != nil {
|
||||
return m.Value
|
||||
func (x *DataKeyValue) GetValue() string {
|
||||
if x != nil {
|
||||
return x.Value
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// DataKeyResponse is a simple response
|
||||
type DataKeyResponse struct {
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (m *DataKeyResponse) Reset() { *m = DataKeyResponse{} }
|
||||
func (m *DataKeyResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*DataKeyResponse) ProtoMessage() {}
|
||||
func (x *DataKeyResponse) Reset() {
|
||||
*x = DataKeyResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_accounts_accounts_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *DataKeyResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DataKeyResponse) ProtoMessage() {}
|
||||
|
||||
func (x *DataKeyResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_accounts_accounts_proto_msgTypes[3]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use DataKeyResponse.ProtoReflect.Descriptor instead.
|
||||
func (*DataKeyResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_e1e7723af4c007b7, []int{3}
|
||||
return file_accounts_accounts_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (m *DataKeyResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_DataKeyResponse.Unmarshal(m, b)
|
||||
}
|
||||
func (m *DataKeyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_DataKeyResponse.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *DataKeyResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_DataKeyResponse.Merge(m, src)
|
||||
}
|
||||
func (m *DataKeyResponse) XXX_Size() int {
|
||||
return xxx_messageInfo_DataKeyResponse.Size(m)
|
||||
}
|
||||
func (m *DataKeyResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_DataKeyResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_DataKeyResponse proto.InternalMessageInfo
|
||||
|
||||
// DataKey describes a simple key value with an account, for fetching
|
||||
type DataKey struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// The account to fetch data for
|
||||
Account string `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"`
|
||||
// The key to fetch
|
||||
Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
|
||||
}
|
||||
|
||||
func (m *DataKey) Reset() { *m = DataKey{} }
|
||||
func (m *DataKey) String() string { return proto.CompactTextString(m) }
|
||||
func (*DataKey) ProtoMessage() {}
|
||||
func (x *DataKey) Reset() {
|
||||
*x = DataKey{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_accounts_accounts_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *DataKey) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DataKey) ProtoMessage() {}
|
||||
|
||||
func (x *DataKey) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_accounts_accounts_proto_msgTypes[4]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use DataKey.ProtoReflect.Descriptor instead.
|
||||
func (*DataKey) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_e1e7723af4c007b7, []int{4}
|
||||
return file_accounts_accounts_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (m *DataKey) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_DataKey.Unmarshal(m, b)
|
||||
}
|
||||
func (m *DataKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_DataKey.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *DataKey) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_DataKey.Merge(m, src)
|
||||
}
|
||||
func (m *DataKey) XXX_Size() int {
|
||||
return xxx_messageInfo_DataKey.Size(m)
|
||||
}
|
||||
func (m *DataKey) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_DataKey.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_DataKey proto.InternalMessageInfo
|
||||
|
||||
func (m *DataKey) GetAccount() string {
|
||||
if m != nil {
|
||||
return m.Account
|
||||
func (x *DataKey) GetAccount() string {
|
||||
if x != nil {
|
||||
return x.Account
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *DataKey) GetKey() string {
|
||||
if m != nil {
|
||||
return m.Key
|
||||
func (x *DataKey) GetKey() string {
|
||||
if x != nil {
|
||||
return x.Key
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// DataResponse describes a data fetch response
|
||||
type DataResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// The value of the key
|
||||
Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
|
||||
}
|
||||
|
||||
func (m *DataResponse) Reset() { *m = DataResponse{} }
|
||||
func (m *DataResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*DataResponse) ProtoMessage() {}
|
||||
func (x *DataResponse) Reset() {
|
||||
*x = DataResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_accounts_accounts_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *DataResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DataResponse) ProtoMessage() {}
|
||||
|
||||
func (x *DataResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_accounts_accounts_proto_msgTypes[5]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use DataResponse.ProtoReflect.Descriptor instead.
|
||||
func (*DataResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_e1e7723af4c007b7, []int{5}
|
||||
return file_accounts_accounts_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (m *DataResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_DataResponse.Unmarshal(m, b)
|
||||
}
|
||||
func (m *DataResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_DataResponse.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *DataResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_DataResponse.Merge(m, src)
|
||||
}
|
||||
func (m *DataResponse) XXX_Size() int {
|
||||
return xxx_messageInfo_DataResponse.Size(m)
|
||||
}
|
||||
func (m *DataResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_DataResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_DataResponse proto.InternalMessageInfo
|
||||
|
||||
func (m *DataResponse) GetValue() string {
|
||||
if m != nil {
|
||||
return m.Value
|
||||
func (x *DataResponse) GetValue() string {
|
||||
if x != nil {
|
||||
return x.Value
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*RegisterInfo)(nil), "accounts.RegisterInfo")
|
||||
proto.RegisterType((*RegisterResponse)(nil), "accounts.RegisterResponse")
|
||||
proto.RegisterType((*DataKeyValue)(nil), "accounts.DataKeyValue")
|
||||
proto.RegisterType((*DataKeyResponse)(nil), "accounts.DataKeyResponse")
|
||||
proto.RegisterType((*DataKey)(nil), "accounts.DataKey")
|
||||
proto.RegisterType((*DataResponse)(nil), "accounts.DataResponse")
|
||||
var File_accounts_accounts_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_accounts_accounts_proto_rawDesc = []byte{
|
||||
0x0a, 0x17, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75,
|
||||
0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75,
|
||||
0x6e, 0x74, 0x73, 0x22, 0x22, 0x0a, 0x0c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x49,
|
||||
0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x12, 0x0a, 0x10, 0x52, 0x65, 0x67, 0x69, 0x73,
|
||||
0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x50, 0x0a, 0x0c, 0x44,
|
||||
0x61, 0x74, 0x61, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61,
|
||||
0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x63,
|
||||
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
|
||||
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x11, 0x0a,
|
||||
0x0f, 0x44, 0x61, 0x74, 0x61, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||
0x22, 0x35, 0x0a, 0x07, 0x44, 0x61, 0x74, 0x61, 0x4b, 0x65, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x61,
|
||||
0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x63,
|
||||
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x24, 0x0a, 0x0c, 0x44, 0x61, 0x74, 0x61, 0x52,
|
||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
|
||||
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x32, 0xcb, 0x01,
|
||||
0x0a, 0x0a, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x6e, 0x74, 0x12, 0x40, 0x0a, 0x08,
|
||||
0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x12, 0x16, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75,
|
||||
0x6e, 0x74, 0x73, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f,
|
||||
0x1a, 0x1a, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x52, 0x65, 0x67, 0x69,
|
||||
0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x42,
|
||||
0x0a, 0x0b, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x16, 0x2e,
|
||||
0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x4b, 0x65, 0x79,
|
||||
0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x19, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73,
|
||||
0x2e, 0x44, 0x61, 0x74, 0x61, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||
0x22, 0x00, 0x12, 0x37, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x11,
|
||||
0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x4b, 0x65,
|
||||
0x79, 0x1a, 0x16, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x44, 0x61, 0x74,
|
||||
0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x25, 0x5a, 0x23, 0x67,
|
||||
0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x64, 0x69, 0x6c, 0x75, 0x7a,
|
||||
0x2f, 0x72, 0x6f, 0x76, 0x65, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e,
|
||||
0x74, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterFile("accounts.proto", fileDescriptor_e1e7723af4c007b7)
|
||||
var (
|
||||
file_accounts_accounts_proto_rawDescOnce sync.Once
|
||||
file_accounts_accounts_proto_rawDescData = file_accounts_accounts_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_accounts_accounts_proto_rawDescGZIP() []byte {
|
||||
file_accounts_accounts_proto_rawDescOnce.Do(func() {
|
||||
file_accounts_accounts_proto_rawDescData = protoimpl.X.CompressGZIP(file_accounts_accounts_proto_rawDescData)
|
||||
})
|
||||
return file_accounts_accounts_proto_rawDescData
|
||||
}
|
||||
|
||||
var fileDescriptor_e1e7723af4c007b7 = []byte{
|
||||
// 276 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x91, 0x41, 0x4b, 0xc3, 0x40,
|
||||
0x10, 0x85, 0x8d, 0x55, 0x1b, 0xc7, 0xa2, 0xed, 0x20, 0x12, 0x73, 0x92, 0x55, 0xc1, 0x53, 0x02,
|
||||
0x8a, 0x78, 0xb5, 0x45, 0x10, 0xf1, 0x22, 0x39, 0x78, 0xf0, 0xb6, 0x8d, 0x63, 0x0c, 0x6d, 0x76,
|
||||
0x43, 0x76, 0x53, 0xa8, 0x7f, 0xd1, 0x3f, 0x25, 0xc9, 0x66, 0x63, 0x30, 0x5e, 0x7a, 0x9b, 0x79,
|
||||
0xcc, 0xfb, 0x66, 0xf6, 0x2d, 0x1c, 0xf2, 0x38, 0x96, 0xa5, 0xd0, 0x2a, 0xc8, 0x0b, 0xa9, 0x25,
|
||||
0xba, 0xb6, 0x67, 0x0c, 0x46, 0x11, 0x25, 0xa9, 0xd2, 0x54, 0x3c, 0x89, 0x0f, 0x89, 0x08, 0x3b,
|
||||
0x82, 0x67, 0xe4, 0x39, 0x67, 0xce, 0xd5, 0x7e, 0x54, 0xd7, 0x0c, 0x61, 0x6c, 0x67, 0x22, 0x52,
|
||||
0xb9, 0x14, 0x8a, 0xd8, 0x0b, 0x8c, 0x1e, 0xb8, 0xe6, 0xcf, 0xb4, 0x7e, 0xe5, 0xcb, 0x92, 0xd0,
|
||||
0x83, 0x61, 0xc3, 0x6c, 0xac, 0xb6, 0xc5, 0x31, 0x0c, 0x16, 0xb4, 0xf6, 0xb6, 0x6b, 0xb5, 0x2a,
|
||||
0xf1, 0x18, 0x76, 0x57, 0x95, 0xc9, 0x1b, 0xd4, 0x9a, 0x69, 0xd8, 0x04, 0x8e, 0x1a, 0x62, 0xbb,
|
||||
0xe4, 0x16, 0x86, 0x8d, 0xb4, 0x09, 0x9f, 0x5d, 0x98, 0xdb, 0x2c, 0xe6, 0xff, 0x7d, 0xd7, 0xdf,
|
||||
0x0e, 0xc0, 0xd4, 0x30, 0xb8, 0xd0, 0x78, 0x0f, 0xae, 0x7d, 0x24, 0x9e, 0x04, 0x6d, 0x5e, 0xdd,
|
||||
0x70, 0x7c, 0xbf, 0xaf, 0xb7, 0xb7, 0x6e, 0xe1, 0x0c, 0x0e, 0xa6, 0x4a, 0xa5, 0x89, 0x30, 0x89,
|
||||
0x74, 0x20, 0xdd, 0xa4, 0xfc, 0xd3, 0x9e, 0xde, 0x61, 0xdc, 0x81, 0xfb, 0x48, 0xda, 0x00, 0x26,
|
||||
0xbd, 0x41, 0xff, 0x0f, 0xf3, 0xd7, 0x38, 0xbb, 0x7c, 0x3b, 0x4f, 0x52, 0xfd, 0x59, 0xce, 0x83,
|
||||
0x58, 0x66, 0x61, 0xf6, 0x9e, 0x2e, 0xcb, 0xaf, 0xb0, 0x90, 0x2b, 0x0a, 0xf3, 0x45, 0x12, 0x5a,
|
||||
0xd7, 0x7c, 0xaf, 0xfe, 0xff, 0x9b, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x22, 0x35, 0x31, 0x6f,
|
||||
0x11, 0x02, 0x00, 0x00,
|
||||
var file_accounts_accounts_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
|
||||
var file_accounts_accounts_proto_goTypes = []interface{}{
|
||||
(*RegisterInfo)(nil), // 0: accounts.RegisterInfo
|
||||
(*RegisterResponse)(nil), // 1: accounts.RegisterResponse
|
||||
(*DataKeyValue)(nil), // 2: accounts.DataKeyValue
|
||||
(*DataKeyResponse)(nil), // 3: accounts.DataKeyResponse
|
||||
(*DataKey)(nil), // 4: accounts.DataKey
|
||||
(*DataResponse)(nil), // 5: accounts.DataResponse
|
||||
}
|
||||
var file_accounts_accounts_proto_depIdxs = []int32{
|
||||
0, // 0: accounts.Accountant.Register:input_type -> accounts.RegisterInfo
|
||||
2, // 1: accounts.Accountant.AssignValue:input_type -> accounts.DataKeyValue
|
||||
4, // 2: accounts.Accountant.GetValue:input_type -> accounts.DataKey
|
||||
1, // 3: accounts.Accountant.Register:output_type -> accounts.RegisterResponse
|
||||
3, // 4: accounts.Accountant.AssignValue:output_type -> accounts.DataKeyResponse
|
||||
5, // 5: accounts.Accountant.GetValue:output_type -> accounts.DataResponse
|
||||
3, // [3:6] is the sub-list for method output_type
|
||||
0, // [0:3] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
0, // [0:0] is the sub-list for extension extendee
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_accounts_accounts_proto_init() }
|
||||
func file_accounts_accounts_proto_init() {
|
||||
if File_accounts_accounts_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_accounts_accounts_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*RegisterInfo); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_accounts_accounts_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*RegisterResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_accounts_accounts_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DataKeyValue); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_accounts_accounts_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DataKeyResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_accounts_accounts_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DataKey); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_accounts_accounts_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DataResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_accounts_accounts_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 6,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_accounts_accounts_proto_goTypes,
|
||||
DependencyIndexes: file_accounts_accounts_proto_depIdxs,
|
||||
MessageInfos: file_accounts_accounts_proto_msgTypes,
|
||||
}.Build()
|
||||
File_accounts_accounts_proto = out.File
|
||||
file_accounts_accounts_proto_rawDesc = nil
|
||||
file_accounts_accounts_proto_goTypes = nil
|
||||
file_accounts_accounts_proto_depIdxs = nil
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
|
@ -384,13 +573,13 @@ type AccountantServer interface {
|
|||
type UnimplementedAccountantServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedAccountantServer) Register(ctx context.Context, req *RegisterInfo) (*RegisterResponse, error) {
|
||||
func (*UnimplementedAccountantServer) Register(context.Context, *RegisterInfo) (*RegisterResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Register not implemented")
|
||||
}
|
||||
func (*UnimplementedAccountantServer) AssignValue(ctx context.Context, req *DataKeyValue) (*DataKeyResponse, error) {
|
||||
func (*UnimplementedAccountantServer) AssignValue(context.Context, *DataKeyValue) (*DataKeyResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method AssignValue not implemented")
|
||||
}
|
||||
func (*UnimplementedAccountantServer) GetValue(ctx context.Context, req *DataKey) (*DataResponse, error) {
|
||||
func (*UnimplementedAccountantServer) GetValue(context.Context, *DataKey) (*DataResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetValue not implemented")
|
||||
}
|
||||
|
||||
|
@ -470,5 +659,5 @@ var _Accountant_serviceDesc = grpc.ServiceDesc{
|
|||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "accounts.proto",
|
||||
Metadata: "accounts/accounts.proto",
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue