704 lines
21 KiB
Go
704 lines
21 KiB
Go
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||
|
// versions:
|
||
|
// protoc-gen-go v1.25.0
|
||
|
// protoc v3.6.1
|
||
|
// source: node.proto
|
||
|
|
||
|
package rpc
|
||
|
|
||
|
import (
|
||
|
context "context"
|
||
|
proto "github.com/golang/protobuf/proto"
|
||
|
_ "google.golang.org/genproto/googleapis/api/annotations"
|
||
|
grpc "google.golang.org/grpc"
|
||
|
codes "google.golang.org/grpc/codes"
|
||
|
status "google.golang.org/grpc/status"
|
||
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||
|
reflect "reflect"
|
||
|
sync "sync"
|
||
|
)
|
||
|
|
||
|
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 that a sufficiently up-to-date version
|
||
|
// of the legacy proto package is being used.
|
||
|
const _ = proto.ProtoPackageIsVersion4
|
||
|
|
||
|
type City struct {
|
||
|
state protoimpl.MessageState
|
||
|
sizeCache protoimpl.SizeCache
|
||
|
unknownFields protoimpl.UnknownFields
|
||
|
|
||
|
Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||
|
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
||
|
PostalCode string `protobuf:"bytes,3,opt,name=postalCode,proto3" json:"postalCode,omitempty"`
|
||
|
}
|
||
|
|
||
|
func (x *City) Reset() {
|
||
|
*x = City{}
|
||
|
if protoimpl.UnsafeEnabled {
|
||
|
mi := &file_node_proto_msgTypes[0]
|
||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
|
ms.StoreMessageInfo(mi)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
func (x *City) String() string {
|
||
|
return protoimpl.X.MessageStringOf(x)
|
||
|
}
|
||
|
|
||
|
func (*City) ProtoMessage() {}
|
||
|
|
||
|
func (x *City) ProtoReflect() protoreflect.Message {
|
||
|
mi := &file_node_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 City.ProtoReflect.Descriptor instead.
|
||
|
func (*City) Descriptor() ([]byte, []int) {
|
||
|
return file_node_proto_rawDescGZIP(), []int{0}
|
||
|
}
|
||
|
|
||
|
func (x *City) GetId() int32 {
|
||
|
if x != nil {
|
||
|
return x.Id
|
||
|
}
|
||
|
return 0
|
||
|
}
|
||
|
|
||
|
func (x *City) GetName() string {
|
||
|
if x != nil {
|
||
|
return x.Name
|
||
|
}
|
||
|
return ""
|
||
|
}
|
||
|
|
||
|
func (x *City) GetPostalCode() string {
|
||
|
if x != nil {
|
||
|
return x.PostalCode
|
||
|
}
|
||
|
return ""
|
||
|
}
|
||
|
|
||
|
type Address struct {
|
||
|
state protoimpl.MessageState
|
||
|
sizeCache protoimpl.SizeCache
|
||
|
unknownFields protoimpl.UnknownFields
|
||
|
|
||
|
City *City `protobuf:"bytes,2,opt,name=city,proto3" json:"city,omitempty"`
|
||
|
Street string `protobuf:"bytes,3,opt,name=street,proto3" json:"street,omitempty"`
|
||
|
Number int32 `protobuf:"varint,4,opt,name=number,proto3" json:"number,omitempty"`
|
||
|
Apartment int32 `protobuf:"varint,5,opt,name=apartment,proto3" json:"apartment,omitempty"`
|
||
|
}
|
||
|
|
||
|
func (x *Address) Reset() {
|
||
|
*x = Address{}
|
||
|
if protoimpl.UnsafeEnabled {
|
||
|
mi := &file_node_proto_msgTypes[1]
|
||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
|
ms.StoreMessageInfo(mi)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
func (x *Address) String() string {
|
||
|
return protoimpl.X.MessageStringOf(x)
|
||
|
}
|
||
|
|
||
|
func (*Address) ProtoMessage() {}
|
||
|
|
||
|
func (x *Address) ProtoReflect() protoreflect.Message {
|
||
|
mi := &file_node_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 Address.ProtoReflect.Descriptor instead.
|
||
|
func (*Address) Descriptor() ([]byte, []int) {
|
||
|
return file_node_proto_rawDescGZIP(), []int{1}
|
||
|
}
|
||
|
|
||
|
func (x *Address) GetCity() *City {
|
||
|
if x != nil {
|
||
|
return x.City
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
func (x *Address) GetStreet() string {
|
||
|
if x != nil {
|
||
|
return x.Street
|
||
|
}
|
||
|
return ""
|
||
|
}
|
||
|
|
||
|
func (x *Address) GetNumber() int32 {
|
||
|
if x != nil {
|
||
|
return x.Number
|
||
|
}
|
||
|
return 0
|
||
|
}
|
||
|
|
||
|
func (x *Address) GetApartment() int32 {
|
||
|
if x != nil {
|
||
|
return x.Apartment
|
||
|
}
|
||
|
return 0
|
||
|
}
|
||
|
|
||
|
type Node struct {
|
||
|
state protoimpl.MessageState
|
||
|
sizeCache protoimpl.SizeCache
|
||
|
unknownFields protoimpl.UnknownFields
|
||
|
|
||
|
Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||
|
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
||
|
Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"`
|
||
|
Address *Address `protobuf:"bytes,4,opt,name=address,proto3" json:"address,omitempty"`
|
||
|
}
|
||
|
|
||
|
func (x *Node) Reset() {
|
||
|
*x = Node{}
|
||
|
if protoimpl.UnsafeEnabled {
|
||
|
mi := &file_node_proto_msgTypes[2]
|
||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
|
ms.StoreMessageInfo(mi)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
func (x *Node) String() string {
|
||
|
return protoimpl.X.MessageStringOf(x)
|
||
|
}
|
||
|
|
||
|
func (*Node) ProtoMessage() {}
|
||
|
|
||
|
func (x *Node) ProtoReflect() protoreflect.Message {
|
||
|
mi := &file_node_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 Node.ProtoReflect.Descriptor instead.
|
||
|
func (*Node) Descriptor() ([]byte, []int) {
|
||
|
return file_node_proto_rawDescGZIP(), []int{2}
|
||
|
}
|
||
|
|
||
|
func (x *Node) GetId() int32 {
|
||
|
if x != nil {
|
||
|
return x.Id
|
||
|
}
|
||
|
return 0
|
||
|
}
|
||
|
|
||
|
func (x *Node) GetName() string {
|
||
|
if x != nil {
|
||
|
return x.Name
|
||
|
}
|
||
|
return ""
|
||
|
}
|
||
|
|
||
|
func (x *Node) GetEmail() string {
|
||
|
if x != nil {
|
||
|
return x.Email
|
||
|
}
|
||
|
return ""
|
||
|
}
|
||
|
|
||
|
func (x *Node) GetAddress() *Address {
|
||
|
if x != nil {
|
||
|
return x.Address
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
type NodeRequest struct {
|
||
|
state protoimpl.MessageState
|
||
|
sizeCache protoimpl.SizeCache
|
||
|
unknownFields protoimpl.UnknownFields
|
||
|
|
||
|
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||
|
}
|
||
|
|
||
|
func (x *NodeRequest) Reset() {
|
||
|
*x = NodeRequest{}
|
||
|
if protoimpl.UnsafeEnabled {
|
||
|
mi := &file_node_proto_msgTypes[3]
|
||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
|
ms.StoreMessageInfo(mi)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
func (x *NodeRequest) String() string {
|
||
|
return protoimpl.X.MessageStringOf(x)
|
||
|
}
|
||
|
|
||
|
func (*NodeRequest) ProtoMessage() {}
|
||
|
|
||
|
func (x *NodeRequest) ProtoReflect() protoreflect.Message {
|
||
|
mi := &file_node_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 NodeRequest.ProtoReflect.Descriptor instead.
|
||
|
func (*NodeRequest) Descriptor() ([]byte, []int) {
|
||
|
return file_node_proto_rawDescGZIP(), []int{3}
|
||
|
}
|
||
|
|
||
|
func (x *NodeRequest) GetName() string {
|
||
|
if x != nil {
|
||
|
return x.Name
|
||
|
}
|
||
|
return ""
|
||
|
}
|
||
|
|
||
|
type Message struct {
|
||
|
state protoimpl.MessageState
|
||
|
sizeCache protoimpl.SizeCache
|
||
|
unknownFields protoimpl.UnknownFields
|
||
|
|
||
|
Content string `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"`
|
||
|
}
|
||
|
|
||
|
func (x *Message) Reset() {
|
||
|
*x = Message{}
|
||
|
if protoimpl.UnsafeEnabled {
|
||
|
mi := &file_node_proto_msgTypes[4]
|
||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
|
ms.StoreMessageInfo(mi)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
func (x *Message) String() string {
|
||
|
return protoimpl.X.MessageStringOf(x)
|
||
|
}
|
||
|
|
||
|
func (*Message) ProtoMessage() {}
|
||
|
|
||
|
func (x *Message) ProtoReflect() protoreflect.Message {
|
||
|
mi := &file_node_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 Message.ProtoReflect.Descriptor instead.
|
||
|
func (*Message) Descriptor() ([]byte, []int) {
|
||
|
return file_node_proto_rawDescGZIP(), []int{4}
|
||
|
}
|
||
|
|
||
|
func (x *Message) GetContent() string {
|
||
|
if x != nil {
|
||
|
return x.Content
|
||
|
}
|
||
|
return ""
|
||
|
}
|
||
|
|
||
|
type NodeResponse struct {
|
||
|
state protoimpl.MessageState
|
||
|
sizeCache protoimpl.SizeCache
|
||
|
unknownFields protoimpl.UnknownFields
|
||
|
|
||
|
Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||
|
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
||
|
Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"`
|
||
|
Address *Address `protobuf:"bytes,4,opt,name=address,proto3" json:"address,omitempty"`
|
||
|
}
|
||
|
|
||
|
func (x *NodeResponse) Reset() {
|
||
|
*x = NodeResponse{}
|
||
|
if protoimpl.UnsafeEnabled {
|
||
|
mi := &file_node_proto_msgTypes[5]
|
||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
|
ms.StoreMessageInfo(mi)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
func (x *NodeResponse) String() string {
|
||
|
return protoimpl.X.MessageStringOf(x)
|
||
|
}
|
||
|
|
||
|
func (*NodeResponse) ProtoMessage() {}
|
||
|
|
||
|
func (x *NodeResponse) ProtoReflect() protoreflect.Message {
|
||
|
mi := &file_node_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 NodeResponse.ProtoReflect.Descriptor instead.
|
||
|
func (*NodeResponse) Descriptor() ([]byte, []int) {
|
||
|
return file_node_proto_rawDescGZIP(), []int{5}
|
||
|
}
|
||
|
|
||
|
func (x *NodeResponse) GetId() int32 {
|
||
|
if x != nil {
|
||
|
return x.Id
|
||
|
}
|
||
|
return 0
|
||
|
}
|
||
|
|
||
|
func (x *NodeResponse) GetName() string {
|
||
|
if x != nil {
|
||
|
return x.Name
|
||
|
}
|
||
|
return ""
|
||
|
}
|
||
|
|
||
|
func (x *NodeResponse) GetEmail() string {
|
||
|
if x != nil {
|
||
|
return x.Email
|
||
|
}
|
||
|
return ""
|
||
|
}
|
||
|
|
||
|
func (x *NodeResponse) GetAddress() *Address {
|
||
|
if x != nil {
|
||
|
return x.Address
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
var File_node_proto protoreflect.FileDescriptor
|
||
|
|
||
|
var file_node_proto_rawDesc = []byte{
|
||
|
0x0a, 0x0a, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x73, 0x65,
|
||
|
0x72, 0x76, 0x69, 0x63, 0x65, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70,
|
||
|
0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72,
|
||
|
0x6f, 0x74, 0x6f, 0x22, 0x4a, 0x0a, 0x04, 0x43, 0x69, 0x74, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69,
|
||
|
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e,
|
||
|
0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12,
|
||
|
0x1e, 0x0a, 0x0a, 0x70, 0x6f, 0x73, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20,
|
||
|
0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x6f, 0x73, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x64, 0x65, 0x22,
|
||
|
0x7a, 0x0a, 0x07, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x21, 0x0a, 0x04, 0x63, 0x69,
|
||
|
0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69,
|
||
|
0x63, 0x65, 0x2e, 0x43, 0x69, 0x74, 0x79, 0x52, 0x04, 0x63, 0x69, 0x74, 0x79, 0x12, 0x16, 0x0a,
|
||
|
0x06, 0x73, 0x74, 0x72, 0x65, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73,
|
||
|
0x74, 0x72, 0x65, 0x65, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18,
|
||
|
0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1c, 0x0a,
|
||
|
0x09, 0x61, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05,
|
||
|
0x52, 0x09, 0x61, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x6c, 0x0a, 0x04, 0x4e,
|
||
|
0x6f, 0x64, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||
|
0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||
|
0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c,
|
||
|
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x2a, 0x0a,
|
||
|
0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10,
|
||
|
0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73,
|
||
|
0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x21, 0x0a, 0x0b, 0x4e, 0x6f, 0x64,
|
||
|
0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65,
|
||
|
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x23, 0x0a, 0x07,
|
||
|
0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65,
|
||
|
0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e,
|
||
|
0x74, 0x22, 0x74, 0x0a, 0x0c, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||
|
0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69,
|
||
|
0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||
|
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03,
|
||
|
0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x2a, 0x0a, 0x07, 0x61,
|
||
|
0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x73,
|
||
|
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x07,
|
||
|
0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x32, 0x9d, 0x01, 0x0a, 0x0b, 0x4e, 0x6f, 0x64, 0x65,
|
||
|
0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x48, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x4e, 0x6f,
|
||
|
0x64, 0x65, 0x12, 0x14, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x4e, 0x6f, 0x64,
|
||
|
0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69,
|
||
|
0x63, 0x65, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
|
||
|
0x10, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0a, 0x12, 0x08, 0x2f, 0x76, 0x31, 0x2f, 0x6e, 0x6f, 0x64,
|
||
|
0x65, 0x12, 0x44, 0x0a, 0x08, 0x53, 0x61, 0x79, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x12, 0x10, 0x2e,
|
||
|
0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a,
|
||
|
0x10, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
|
||
|
0x65, 0x22, 0x14, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0e, 0x22, 0x09, 0x2f, 0x76, 0x31, 0x2f, 0x68,
|
||
|
0x65, 0x6c, 0x6c, 0x6f, 0x3a, 0x01, 0x2a, 0x42, 0x07, 0x5a, 0x05, 0x2e, 0x3b, 0x72, 0x70, 0x63,
|
||
|
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||
|
}
|
||
|
|
||
|
var (
|
||
|
file_node_proto_rawDescOnce sync.Once
|
||
|
file_node_proto_rawDescData = file_node_proto_rawDesc
|
||
|
)
|
||
|
|
||
|
func file_node_proto_rawDescGZIP() []byte {
|
||
|
file_node_proto_rawDescOnce.Do(func() {
|
||
|
file_node_proto_rawDescData = protoimpl.X.CompressGZIP(file_node_proto_rawDescData)
|
||
|
})
|
||
|
return file_node_proto_rawDescData
|
||
|
}
|
||
|
|
||
|
var file_node_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
|
||
|
var file_node_proto_goTypes = []interface{}{
|
||
|
(*City)(nil), // 0: service.City
|
||
|
(*Address)(nil), // 1: service.Address
|
||
|
(*Node)(nil), // 2: service.Node
|
||
|
(*NodeRequest)(nil), // 3: service.NodeRequest
|
||
|
(*Message)(nil), // 4: service.Message
|
||
|
(*NodeResponse)(nil), // 5: service.NodeResponse
|
||
|
}
|
||
|
var file_node_proto_depIdxs = []int32{
|
||
|
0, // 0: service.Address.city:type_name -> service.City
|
||
|
1, // 1: service.Node.address:type_name -> service.Address
|
||
|
1, // 2: service.NodeResponse.address:type_name -> service.Address
|
||
|
3, // 3: service.NodeService.GetNode:input_type -> service.NodeRequest
|
||
|
4, // 4: service.NodeService.SayHello:input_type -> service.Message
|
||
|
5, // 5: service.NodeService.GetNode:output_type -> service.NodeResponse
|
||
|
4, // 6: service.NodeService.SayHello:output_type -> service.Message
|
||
|
5, // [5:7] is the sub-list for method output_type
|
||
|
3, // [3:5] is the sub-list for method input_type
|
||
|
3, // [3:3] is the sub-list for extension type_name
|
||
|
3, // [3:3] is the sub-list for extension extendee
|
||
|
0, // [0:3] is the sub-list for field type_name
|
||
|
}
|
||
|
|
||
|
func init() { file_node_proto_init() }
|
||
|
func file_node_proto_init() {
|
||
|
if File_node_proto != nil {
|
||
|
return
|
||
|
}
|
||
|
if !protoimpl.UnsafeEnabled {
|
||
|
file_node_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||
|
switch v := v.(*City); i {
|
||
|
case 0:
|
||
|
return &v.state
|
||
|
case 1:
|
||
|
return &v.sizeCache
|
||
|
case 2:
|
||
|
return &v.unknownFields
|
||
|
default:
|
||
|
return nil
|
||
|
}
|
||
|
}
|
||
|
file_node_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||
|
switch v := v.(*Address); i {
|
||
|
case 0:
|
||
|
return &v.state
|
||
|
case 1:
|
||
|
return &v.sizeCache
|
||
|
case 2:
|
||
|
return &v.unknownFields
|
||
|
default:
|
||
|
return nil
|
||
|
}
|
||
|
}
|
||
|
file_node_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||
|
switch v := v.(*Node); i {
|
||
|
case 0:
|
||
|
return &v.state
|
||
|
case 1:
|
||
|
return &v.sizeCache
|
||
|
case 2:
|
||
|
return &v.unknownFields
|
||
|
default:
|
||
|
return nil
|
||
|
}
|
||
|
}
|
||
|
file_node_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||
|
switch v := v.(*NodeRequest); i {
|
||
|
case 0:
|
||
|
return &v.state
|
||
|
case 1:
|
||
|
return &v.sizeCache
|
||
|
case 2:
|
||
|
return &v.unknownFields
|
||
|
default:
|
||
|
return nil
|
||
|
}
|
||
|
}
|
||
|
file_node_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||
|
switch v := v.(*Message); i {
|
||
|
case 0:
|
||
|
return &v.state
|
||
|
case 1:
|
||
|
return &v.sizeCache
|
||
|
case 2:
|
||
|
return &v.unknownFields
|
||
|
default:
|
||
|
return nil
|
||
|
}
|
||
|
}
|
||
|
file_node_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||
|
switch v := v.(*NodeResponse); 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_node_proto_rawDesc,
|
||
|
NumEnums: 0,
|
||
|
NumMessages: 6,
|
||
|
NumExtensions: 0,
|
||
|
NumServices: 1,
|
||
|
},
|
||
|
GoTypes: file_node_proto_goTypes,
|
||
|
DependencyIndexes: file_node_proto_depIdxs,
|
||
|
MessageInfos: file_node_proto_msgTypes,
|
||
|
}.Build()
|
||
|
File_node_proto = out.File
|
||
|
file_node_proto_rawDesc = nil
|
||
|
file_node_proto_goTypes = nil
|
||
|
file_node_proto_depIdxs = nil
|
||
|
}
|
||
|
|
||
|
// Reference imports to suppress errors if they are not otherwise used.
|
||
|
var _ context.Context
|
||
|
var _ grpc.ClientConnInterface
|
||
|
|
||
|
// This is a compile-time assertion to ensure that this generated file
|
||
|
// is compatible with the grpc package it is being compiled against.
|
||
|
const _ = grpc.SupportPackageIsVersion6
|
||
|
|
||
|
// NodeServiceClient is the client API for NodeService service.
|
||
|
//
|
||
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
||
|
type NodeServiceClient interface {
|
||
|
GetNode(ctx context.Context, in *NodeRequest, opts ...grpc.CallOption) (*NodeResponse, error)
|
||
|
SayHello(ctx context.Context, in *Message, opts ...grpc.CallOption) (*Message, error)
|
||
|
}
|
||
|
|
||
|
type nodeServiceClient struct {
|
||
|
cc grpc.ClientConnInterface
|
||
|
}
|
||
|
|
||
|
func NewNodeServiceClient(cc grpc.ClientConnInterface) NodeServiceClient {
|
||
|
return &nodeServiceClient{cc}
|
||
|
}
|
||
|
|
||
|
func (c *nodeServiceClient) GetNode(ctx context.Context, in *NodeRequest, opts ...grpc.CallOption) (*NodeResponse, error) {
|
||
|
out := new(NodeResponse)
|
||
|
err := c.cc.Invoke(ctx, "/service.NodeService/GetNode", in, out, opts...)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return out, nil
|
||
|
}
|
||
|
|
||
|
func (c *nodeServiceClient) SayHello(ctx context.Context, in *Message, opts ...grpc.CallOption) (*Message, error) {
|
||
|
out := new(Message)
|
||
|
err := c.cc.Invoke(ctx, "/service.NodeService/SayHello", in, out, opts...)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return out, nil
|
||
|
}
|
||
|
|
||
|
// NodeServiceServer is the server API for NodeService service.
|
||
|
type NodeServiceServer interface {
|
||
|
GetNode(context.Context, *NodeRequest) (*NodeResponse, error)
|
||
|
SayHello(context.Context, *Message) (*Message, error)
|
||
|
}
|
||
|
|
||
|
// UnimplementedNodeServiceServer can be embedded to have forward compatible implementations.
|
||
|
type UnimplementedNodeServiceServer struct {
|
||
|
}
|
||
|
|
||
|
func (*UnimplementedNodeServiceServer) GetNode(context.Context, *NodeRequest) (*NodeResponse, error) {
|
||
|
return nil, status.Errorf(codes.Unimplemented, "method GetNode not implemented")
|
||
|
}
|
||
|
func (*UnimplementedNodeServiceServer) SayHello(context.Context, *Message) (*Message, error) {
|
||
|
return nil, status.Errorf(codes.Unimplemented, "method SayHello not implemented")
|
||
|
}
|
||
|
|
||
|
func RegisterNodeServiceServer(s *grpc.Server, srv NodeServiceServer) {
|
||
|
s.RegisterService(&_NodeService_serviceDesc, srv)
|
||
|
}
|
||
|
|
||
|
func _NodeService_GetNode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
|
in := new(NodeRequest)
|
||
|
if err := dec(in); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
if interceptor == nil {
|
||
|
return srv.(NodeServiceServer).GetNode(ctx, in)
|
||
|
}
|
||
|
info := &grpc.UnaryServerInfo{
|
||
|
Server: srv,
|
||
|
FullMethod: "/service.NodeService/GetNode",
|
||
|
}
|
||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
|
return srv.(NodeServiceServer).GetNode(ctx, req.(*NodeRequest))
|
||
|
}
|
||
|
return interceptor(ctx, in, info, handler)
|
||
|
}
|
||
|
|
||
|
func _NodeService_SayHello_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
|
in := new(Message)
|
||
|
if err := dec(in); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
if interceptor == nil {
|
||
|
return srv.(NodeServiceServer).SayHello(ctx, in)
|
||
|
}
|
||
|
info := &grpc.UnaryServerInfo{
|
||
|
Server: srv,
|
||
|
FullMethod: "/service.NodeService/SayHello",
|
||
|
}
|
||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
|
return srv.(NodeServiceServer).SayHello(ctx, req.(*Message))
|
||
|
}
|
||
|
return interceptor(ctx, in, info, handler)
|
||
|
}
|
||
|
|
||
|
var _NodeService_serviceDesc = grpc.ServiceDesc{
|
||
|
ServiceName: "service.NodeService",
|
||
|
HandlerType: (*NodeServiceServer)(nil),
|
||
|
Methods: []grpc.MethodDesc{
|
||
|
{
|
||
|
MethodName: "GetNode",
|
||
|
Handler: _NodeService_GetNode_Handler,
|
||
|
},
|
||
|
{
|
||
|
MethodName: "SayHello",
|
||
|
Handler: _NodeService_SayHello_Handler,
|
||
|
},
|
||
|
},
|
||
|
Streams: []grpc.StreamDesc{},
|
||
|
Metadata: "node.proto",
|
||
|
}
|