grpcexercises/calculator/pb/calculator.pb.go

476 lines
14 KiB
Go

// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.31.0
// protoc v4.25.1
// source: calculator.proto
package pb
import (
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)
)
type SumRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Num int64 `protobuf:"varint,1,opt,name=num,proto3" json:"num,omitempty"`
}
func (x *SumRequest) Reset() {
*x = SumRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_calculator_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SumRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SumRequest) ProtoMessage() {}
func (x *SumRequest) ProtoReflect() protoreflect.Message {
mi := &file_calculator_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 SumRequest.ProtoReflect.Descriptor instead.
func (*SumRequest) Descriptor() ([]byte, []int) {
return file_calculator_proto_rawDescGZIP(), []int{0}
}
func (x *SumRequest) GetNum() int64 {
if x != nil {
return x.Num
}
return 0
}
type SumResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Total int64 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"`
}
func (x *SumResponse) Reset() {
*x = SumResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_calculator_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SumResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SumResponse) ProtoMessage() {}
func (x *SumResponse) ProtoReflect() protoreflect.Message {
mi := &file_calculator_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 SumResponse.ProtoReflect.Descriptor instead.
func (*SumResponse) Descriptor() ([]byte, []int) {
return file_calculator_proto_rawDescGZIP(), []int{1}
}
func (x *SumResponse) GetTotal() int64 {
if x != nil {
return x.Total
}
return 0
}
type RandomNumsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Num int64 `protobuf:"varint,1,opt,name=num,proto3" json:"num,omitempty"`
}
func (x *RandomNumsRequest) Reset() {
*x = RandomNumsRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_calculator_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RandomNumsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RandomNumsRequest) ProtoMessage() {}
func (x *RandomNumsRequest) ProtoReflect() protoreflect.Message {
mi := &file_calculator_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 RandomNumsRequest.ProtoReflect.Descriptor instead.
func (*RandomNumsRequest) Descriptor() ([]byte, []int) {
return file_calculator_proto_rawDescGZIP(), []int{2}
}
func (x *RandomNumsRequest) GetNum() int64 {
if x != nil {
return x.Num
}
return 0
}
type RandomNumsResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Num int64 `protobuf:"varint,1,opt,name=num,proto3" json:"num,omitempty"`
}
func (x *RandomNumsResponse) Reset() {
*x = RandomNumsResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_calculator_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RandomNumsResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RandomNumsResponse) ProtoMessage() {}
func (x *RandomNumsResponse) ProtoReflect() protoreflect.Message {
mi := &file_calculator_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 RandomNumsResponse.ProtoReflect.Descriptor instead.
func (*RandomNumsResponse) Descriptor() ([]byte, []int) {
return file_calculator_proto_rawDescGZIP(), []int{3}
}
func (x *RandomNumsResponse) GetNum() int64 {
if x != nil {
return x.Num
}
return 0
}
type AverageRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Num int64 `protobuf:"varint,1,opt,name=num,proto3" json:"num,omitempty"`
}
func (x *AverageRequest) Reset() {
*x = AverageRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_calculator_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *AverageRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AverageRequest) ProtoMessage() {}
func (x *AverageRequest) ProtoReflect() protoreflect.Message {
mi := &file_calculator_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 AverageRequest.ProtoReflect.Descriptor instead.
func (*AverageRequest) Descriptor() ([]byte, []int) {
return file_calculator_proto_rawDescGZIP(), []int{4}
}
func (x *AverageRequest) GetNum() int64 {
if x != nil {
return x.Num
}
return 0
}
type AverageResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Average float32 `protobuf:"fixed32,1,opt,name=average,proto3" json:"average,omitempty"`
}
func (x *AverageResponse) Reset() {
*x = AverageResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_calculator_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *AverageResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AverageResponse) ProtoMessage() {}
func (x *AverageResponse) ProtoReflect() protoreflect.Message {
mi := &file_calculator_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 AverageResponse.ProtoReflect.Descriptor instead.
func (*AverageResponse) Descriptor() ([]byte, []int) {
return file_calculator_proto_rawDescGZIP(), []int{5}
}
func (x *AverageResponse) GetAverage() float32 {
if x != nil {
return x.Average
}
return 0
}
var File_calculator_proto protoreflect.FileDescriptor
var file_calculator_proto_rawDesc = []byte{
0x0a, 0x10, 0x63, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x12, 0x05, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x1e, 0x0a, 0x0a, 0x53, 0x75, 0x6d,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6e, 0x75, 0x6d, 0x18, 0x01,
0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x6e, 0x75, 0x6d, 0x22, 0x23, 0x0a, 0x0b, 0x53, 0x75, 0x6d,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61,
0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x22, 0x25,
0x0a, 0x11, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x4e, 0x75, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6e, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03,
0x52, 0x03, 0x6e, 0x75, 0x6d, 0x22, 0x26, 0x0a, 0x12, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x4e,
0x75, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6e,
0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x6e, 0x75, 0x6d, 0x22, 0x22, 0x0a,
0x0e, 0x41, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
0x10, 0x0a, 0x03, 0x6e, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x6e, 0x75,
0x6d, 0x22, 0x2b, 0x0a, 0x0f, 0x41, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x18,
0x01, 0x20, 0x01, 0x28, 0x02, 0x52, 0x07, 0x61, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x32, 0xcb,
0x01, 0x0a, 0x10, 0x43, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76,
0x69, 0x63, 0x65, 0x12, 0x30, 0x0a, 0x03, 0x53, 0x75, 0x6d, 0x12, 0x11, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x2e, 0x53, 0x75, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x75, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x22, 0x00, 0x28, 0x01, 0x12, 0x45, 0x0a, 0x0a, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x4e,
0x75, 0x6d, 0x73, 0x12, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x61, 0x6e, 0x64,
0x6f, 0x6d, 0x4e, 0x75, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x4e, 0x75, 0x6d, 0x73,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x3e, 0x0a, 0x07,
0x41, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x12, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e,
0x41, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x41, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x42, 0x36, 0x5a, 0x34,
0x67, 0x69, 0x74, 0x2e, 0x67, 0x71, 0x6e, 0x6f, 0x74, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
0x67, 0x75, 0x6f, 0x71, 0x69, 0x61, 0x6e, 0x67, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x65, 0x78, 0x65,
0x72, 0x63, 0x69, 0x73, 0x65, 0x73, 0x2f, 0x63, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x6f,
0x72, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_calculator_proto_rawDescOnce sync.Once
file_calculator_proto_rawDescData = file_calculator_proto_rawDesc
)
func file_calculator_proto_rawDescGZIP() []byte {
file_calculator_proto_rawDescOnce.Do(func() {
file_calculator_proto_rawDescData = protoimpl.X.CompressGZIP(file_calculator_proto_rawDescData)
})
return file_calculator_proto_rawDescData
}
var file_calculator_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_calculator_proto_goTypes = []interface{}{
(*SumRequest)(nil), // 0: proto.SumRequest
(*SumResponse)(nil), // 1: proto.SumResponse
(*RandomNumsRequest)(nil), // 2: proto.RandomNumsRequest
(*RandomNumsResponse)(nil), // 3: proto.RandomNumsResponse
(*AverageRequest)(nil), // 4: proto.AverageRequest
(*AverageResponse)(nil), // 5: proto.AverageResponse
}
var file_calculator_proto_depIdxs = []int32{
0, // 0: proto.CalculateService.Sum:input_type -> proto.SumRequest
2, // 1: proto.CalculateService.RandomNums:input_type -> proto.RandomNumsRequest
4, // 2: proto.CalculateService.Average:input_type -> proto.AverageRequest
1, // 3: proto.CalculateService.Sum:output_type -> proto.SumResponse
3, // 4: proto.CalculateService.RandomNums:output_type -> proto.RandomNumsResponse
5, // 5: proto.CalculateService.Average:output_type -> proto.AverageResponse
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_calculator_proto_init() }
func file_calculator_proto_init() {
if File_calculator_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_calculator_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SumRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_calculator_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SumResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_calculator_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RandomNumsRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_calculator_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RandomNumsResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_calculator_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*AverageRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_calculator_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*AverageResponse); 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_calculator_proto_rawDesc,
NumEnums: 0,
NumMessages: 6,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_calculator_proto_goTypes,
DependencyIndexes: file_calculator_proto_depIdxs,
MessageInfos: file_calculator_proto_msgTypes,
}.Build()
File_calculator_proto = out.File
file_calculator_proto_rawDesc = nil
file_calculator_proto_goTypes = nil
file_calculator_proto_depIdxs = nil
}