testmsg.pb.go 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // versions:
  3. // protoc-gen-go v1.24.0
  4. // protoc v3.12.1
  5. // source: testmsg.proto
  6. package testmsg
  7. import (
  8. proto "github.com/golang/protobuf/proto"
  9. protoreflect "google.golang.org/protobuf/reflect/protoreflect"
  10. protoimpl "google.golang.org/protobuf/runtime/protoimpl"
  11. reflect "reflect"
  12. sync "sync"
  13. )
  14. const (
  15. // Verify that this generated code is sufficiently up-to-date.
  16. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
  17. // Verify that runtime/protoimpl is sufficiently up-to-date.
  18. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
  19. )
  20. // This is a compile-time assertion that a sufficiently up-to-date version
  21. // of the legacy proto package is being used.
  22. const _ = proto.ProtoPackageIsVersion4
  23. type TestMessage struct {
  24. state protoimpl.MessageState
  25. sizeCache protoimpl.SizeCache
  26. unknownFields protoimpl.UnknownFields
  27. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
  28. Age int32 `protobuf:"varint,2,opt,name=age,proto3" json:"age,omitempty"`
  29. Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"`
  30. }
  31. func (x *TestMessage) Reset() {
  32. *x = TestMessage{}
  33. if protoimpl.UnsafeEnabled {
  34. mi := &file_testmsg_proto_msgTypes[0]
  35. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  36. ms.StoreMessageInfo(mi)
  37. }
  38. }
  39. func (x *TestMessage) String() string {
  40. return protoimpl.X.MessageStringOf(x)
  41. }
  42. func (*TestMessage) ProtoMessage() {}
  43. func (x *TestMessage) ProtoReflect() protoreflect.Message {
  44. mi := &file_testmsg_proto_msgTypes[0]
  45. if protoimpl.UnsafeEnabled && x != nil {
  46. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  47. if ms.LoadMessageInfo() == nil {
  48. ms.StoreMessageInfo(mi)
  49. }
  50. return ms
  51. }
  52. return mi.MessageOf(x)
  53. }
  54. // Deprecated: Use TestMessage.ProtoReflect.Descriptor instead.
  55. func (*TestMessage) Descriptor() ([]byte, []int) {
  56. return file_testmsg_proto_rawDescGZIP(), []int{0}
  57. }
  58. func (x *TestMessage) GetName() string {
  59. if x != nil {
  60. return x.Name
  61. }
  62. return ""
  63. }
  64. func (x *TestMessage) GetAge() int32 {
  65. if x != nil {
  66. return x.Age
  67. }
  68. return 0
  69. }
  70. func (x *TestMessage) GetAddress() string {
  71. if x != nil {
  72. return x.Address
  73. }
  74. return ""
  75. }
  76. var File_testmsg_proto protoreflect.FileDescriptor
  77. var file_testmsg_proto_rawDesc = []byte{
  78. 0x0a, 0x0d, 0x74, 0x65, 0x73, 0x74, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
  79. 0x07, 0x74, 0x65, 0x73, 0x74, 0x6d, 0x73, 0x67, 0x22, 0x4d, 0x0a, 0x0b, 0x54, 0x65, 0x73, 0x74,
  80. 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
  81. 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x61,
  82. 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x61, 0x67, 0x65, 0x12, 0x18, 0x0a,
  83. 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07,
  84. 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x0b, 0x5a, 0x09, 0x2e, 0x3b, 0x74, 0x65, 0x73,
  85. 0x74, 0x6d, 0x73, 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
  86. }
  87. var (
  88. file_testmsg_proto_rawDescOnce sync.Once
  89. file_testmsg_proto_rawDescData = file_testmsg_proto_rawDesc
  90. )
  91. func file_testmsg_proto_rawDescGZIP() []byte {
  92. file_testmsg_proto_rawDescOnce.Do(func() {
  93. file_testmsg_proto_rawDescData = protoimpl.X.CompressGZIP(file_testmsg_proto_rawDescData)
  94. })
  95. return file_testmsg_proto_rawDescData
  96. }
  97. var file_testmsg_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
  98. var file_testmsg_proto_goTypes = []interface{}{
  99. (*TestMessage)(nil), // 0: testmsg.TestMessage
  100. }
  101. var file_testmsg_proto_depIdxs = []int32{
  102. 0, // [0:0] is the sub-list for method output_type
  103. 0, // [0:0] is the sub-list for method input_type
  104. 0, // [0:0] is the sub-list for extension type_name
  105. 0, // [0:0] is the sub-list for extension extendee
  106. 0, // [0:0] is the sub-list for field type_name
  107. }
  108. func init() { file_testmsg_proto_init() }
  109. func file_testmsg_proto_init() {
  110. if File_testmsg_proto != nil {
  111. return
  112. }
  113. if !protoimpl.UnsafeEnabled {
  114. file_testmsg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
  115. switch v := v.(*TestMessage); i {
  116. case 0:
  117. return &v.state
  118. case 1:
  119. return &v.sizeCache
  120. case 2:
  121. return &v.unknownFields
  122. default:
  123. return nil
  124. }
  125. }
  126. }
  127. type x struct{}
  128. out := protoimpl.TypeBuilder{
  129. File: protoimpl.DescBuilder{
  130. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  131. RawDescriptor: file_testmsg_proto_rawDesc,
  132. NumEnums: 0,
  133. NumMessages: 1,
  134. NumExtensions: 0,
  135. NumServices: 0,
  136. },
  137. GoTypes: file_testmsg_proto_goTypes,
  138. DependencyIndexes: file_testmsg_proto_depIdxs,
  139. MessageInfos: file_testmsg_proto_msgTypes,
  140. }.Build()
  141. File_testmsg_proto = out.File
  142. file_testmsg_proto_rawDesc = nil
  143. file_testmsg_proto_goTypes = nil
  144. file_testmsg_proto_depIdxs = nil
  145. }