1 Star 0 Fork 1

CHUAN / go-scaffold

forked from Allen / go-scaffold 
Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
Clone or Download
hello.pb.go 9.03 KB
Copy Edit Raw Blame History
Allen authored 2021-08-04 11:39 . update Marshaler options
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.1
// protoc v3.17.2
// source: hello.proto
package hello
import (
_ "google.golang.org/genproto/googleapis/api/annotations"
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 MagicNumber int32
const (
MagicNumber_MAGICNUMBER_UNSPECIFIED MagicNumber = 0
MagicNumber_ONE MagicNumber = 1
MagicNumber_TWO MagicNumber = 2
)
// Enum value maps for MagicNumber.
var (
MagicNumber_name = map[int32]string{
0: "MAGICNUMBER_UNSPECIFIED",
1: "ONE",
2: "TWO",
}
MagicNumber_value = map[string]int32{
"MAGICNUMBER_UNSPECIFIED": 0,
"ONE": 1,
"TWO": 2,
}
)
func (x MagicNumber) Enum() *MagicNumber {
p := new(MagicNumber)
*p = x
return p
}
func (x MagicNumber) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (MagicNumber) Descriptor() protoreflect.EnumDescriptor {
return file_hello_proto_enumTypes[0].Descriptor()
}
func (MagicNumber) Type() protoreflect.EnumType {
return &file_hello_proto_enumTypes[0]
}
func (x MagicNumber) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use MagicNumber.Descriptor instead.
func (MagicNumber) EnumDescriptor() ([]byte, []int) {
return file_hello_proto_rawDescGZIP(), []int{0}
}
type SayHiRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
}
func (x *SayHiRequest) Reset() {
*x = SayHiRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_hello_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SayHiRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SayHiRequest) ProtoMessage() {}
func (x *SayHiRequest) ProtoReflect() protoreflect.Message {
mi := &file_hello_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 SayHiRequest.ProtoReflect.Descriptor instead.
func (*SayHiRequest) Descriptor() ([]byte, []int) {
return file_hello_proto_rawDescGZIP(), []int{0}
}
func (x *SayHiRequest) GetName() string {
if x != nil {
return x.Name
}
return ""
}
type SayHiResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"`
MagicNumber int32 `protobuf:"varint,2,opt,name=magic_number,json=magicNumber,proto3" json:"magic_number,omitempty"`
Number MagicNumber `protobuf:"varint,3,opt,name=number,proto3,enum=hello.MagicNumber" json:"number,omitempty"`
}
func (x *SayHiResponse) Reset() {
*x = SayHiResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_hello_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SayHiResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SayHiResponse) ProtoMessage() {}
func (x *SayHiResponse) ProtoReflect() protoreflect.Message {
mi := &file_hello_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 SayHiResponse.ProtoReflect.Descriptor instead.
func (*SayHiResponse) Descriptor() ([]byte, []int) {
return file_hello_proto_rawDescGZIP(), []int{1}
}
func (x *SayHiResponse) GetText() string {
if x != nil {
return x.Text
}
return ""
}
func (x *SayHiResponse) GetMagicNumber() int32 {
if x != nil {
return x.MagicNumber
}
return 0
}
func (x *SayHiResponse) GetNumber() MagicNumber {
if x != nil {
return x.Number
}
return MagicNumber_MAGICNUMBER_UNSPECIFIED
}
var File_hello_proto protoreflect.FileDescriptor
var file_hello_proto_rawDesc = []byte{
0x0a, 0x0b, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x68,
0x65, 0x6c, 0x6c, 0x6f, 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, 0x22, 0x0a, 0x0c, 0x53, 0x61, 0x79, 0x48, 0x69, 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, 0x72, 0x0a, 0x0d, 0x53, 0x61, 0x79, 0x48, 0x69, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x65, 0x78, 0x74, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x65, 0x78, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6d,
0x61, 0x67, 0x69, 0x63, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28,
0x05, 0x52, 0x0b, 0x6d, 0x61, 0x67, 0x69, 0x63, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x2a,
0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12,
0x2e, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x2e, 0x4d, 0x61, 0x67, 0x69, 0x63, 0x4e, 0x75, 0x6d, 0x62,
0x65, 0x72, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2a, 0x3c, 0x0a, 0x0b, 0x4d, 0x61,
0x67, 0x69, 0x63, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x17, 0x4d, 0x41, 0x47,
0x49, 0x43, 0x4e, 0x55, 0x4d, 0x42, 0x45, 0x52, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49,
0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x4f, 0x4e, 0x45, 0x10, 0x01, 0x12,
0x07, 0x0a, 0x03, 0x54, 0x57, 0x4f, 0x10, 0x02, 0x32, 0x56, 0x0a, 0x05, 0x48, 0x65, 0x6c, 0x6c,
0x6f, 0x12, 0x4d, 0x0a, 0x05, 0x53, 0x61, 0x79, 0x48, 0x69, 0x12, 0x13, 0x2e, 0x68, 0x65, 0x6c,
0x6c, 0x6f, 0x2e, 0x53, 0x61, 0x79, 0x48, 0x69, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x14, 0x2e, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x2e, 0x53, 0x61, 0x79, 0x48, 0x69, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f,
0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x2f, 0x73, 0x61, 0x79,
0x42, 0x09, 0x5a, 0x07, 0x2e, 0x3b, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x33,
}
var (
file_hello_proto_rawDescOnce sync.Once
file_hello_proto_rawDescData = file_hello_proto_rawDesc
)
func file_hello_proto_rawDescGZIP() []byte {
file_hello_proto_rawDescOnce.Do(func() {
file_hello_proto_rawDescData = protoimpl.X.CompressGZIP(file_hello_proto_rawDescData)
})
return file_hello_proto_rawDescData
}
var file_hello_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_hello_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_hello_proto_goTypes = []interface{}{
(MagicNumber)(0), // 0: hello.MagicNumber
(*SayHiRequest)(nil), // 1: hello.SayHiRequest
(*SayHiResponse)(nil), // 2: hello.SayHiResponse
}
var file_hello_proto_depIdxs = []int32{
0, // 0: hello.SayHiResponse.number:type_name -> hello.MagicNumber
1, // 1: hello.Hello.SayHi:input_type -> hello.SayHiRequest
2, // 2: hello.Hello.SayHi:output_type -> hello.SayHiResponse
2, // [2:3] is the sub-list for method output_type
1, // [1:2] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_hello_proto_init() }
func file_hello_proto_init() {
if File_hello_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_hello_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SayHiRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_hello_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SayHiResponse); 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_hello_proto_rawDesc,
NumEnums: 1,
NumMessages: 2,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_hello_proto_goTypes,
DependencyIndexes: file_hello_proto_depIdxs,
EnumInfos: file_hello_proto_enumTypes,
MessageInfos: file_hello_proto_msgTypes,
}.Build()
File_hello_proto = out.File
file_hello_proto_rawDesc = nil
file_hello_proto_goTypes = nil
file_hello_proto_depIdxs = nil
}
Go
1
https://gitee.com/chuanmension/go-scaffold.git
git@gitee.com:chuanmension/go-scaffold.git
chuanmension
go-scaffold
go-scaffold
v1.0.8

Search