You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
387 lines
12 KiB
387 lines
12 KiB
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// versions:
|
|
// protoc-gen-go v1.26.0
|
|
// protoc v3.13.0
|
|
// source: example.proto
|
|
|
|
package v1
|
|
|
|
import (
|
|
_ "github.com/envoyproxy/protoc-gen-validate/validate"
|
|
_ "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 Reply struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
|
|
}
|
|
|
|
func (x *Reply) Reset() {
|
|
*x = Reply{}
|
|
if protoimpl.UnsafeEnabled {
|
|
mi := &file_example_proto_msgTypes[0]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
}
|
|
|
|
func (x *Reply) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*Reply) ProtoMessage() {}
|
|
|
|
func (x *Reply) ProtoReflect() protoreflect.Message {
|
|
mi := &file_example_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 Reply.ProtoReflect.Descriptor instead.
|
|
func (*Reply) Descriptor() ([]byte, []int) {
|
|
return file_example_proto_rawDescGZIP(), []int{0}
|
|
}
|
|
|
|
func (x *Reply) GetMessage() string {
|
|
if x != nil {
|
|
return x.Message
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type Request struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
|
Age int32 `protobuf:"varint,2,opt,name=age,proto3" json:"age,omitempty"`
|
|
Code uint32 `protobuf:"varint,3,opt,name=code,proto3" json:"code,omitempty"`
|
|
Score float32 `protobuf:"fixed32,4,opt,name=score,proto3" json:"score,omitempty"`
|
|
State bool `protobuf:"varint,5,opt,name=state,proto3" json:"state,omitempty"`
|
|
Path string `protobuf:"bytes,6,opt,name=path,proto3" json:"path,omitempty"`
|
|
Phone string `protobuf:"bytes,7,opt,name=phone,proto3" json:"phone,omitempty"`
|
|
Explain string `protobuf:"bytes,8,opt,name=explain,proto3" json:"explain,omitempty"`
|
|
Name string `protobuf:"bytes,9,opt,name=name,proto3" json:"name,omitempty"`
|
|
Card string `protobuf:"bytes,10,opt,name=card,proto3" json:"card,omitempty"`
|
|
Info *Info `protobuf:"bytes,11,opt,name=info,proto3" json:"info,omitempty"`
|
|
}
|
|
|
|
func (x *Request) Reset() {
|
|
*x = Request{}
|
|
if protoimpl.UnsafeEnabled {
|
|
mi := &file_example_proto_msgTypes[1]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
}
|
|
|
|
func (x *Request) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*Request) ProtoMessage() {}
|
|
|
|
func (x *Request) ProtoReflect() protoreflect.Message {
|
|
mi := &file_example_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 Request.ProtoReflect.Descriptor instead.
|
|
func (*Request) Descriptor() ([]byte, []int) {
|
|
return file_example_proto_rawDescGZIP(), []int{1}
|
|
}
|
|
|
|
func (x *Request) GetId() int64 {
|
|
if x != nil {
|
|
return x.Id
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *Request) GetAge() int32 {
|
|
if x != nil {
|
|
return x.Age
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *Request) GetCode() uint32 {
|
|
if x != nil {
|
|
return x.Code
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *Request) GetScore() float32 {
|
|
if x != nil {
|
|
return x.Score
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *Request) GetState() bool {
|
|
if x != nil {
|
|
return x.State
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (x *Request) GetPath() string {
|
|
if x != nil {
|
|
return x.Path
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *Request) GetPhone() string {
|
|
if x != nil {
|
|
return x.Phone
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *Request) GetExplain() string {
|
|
if x != nil {
|
|
return x.Explain
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *Request) GetName() string {
|
|
if x != nil {
|
|
return x.Name
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *Request) GetCard() string {
|
|
if x != nil {
|
|
return x.Card
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *Request) GetInfo() *Info {
|
|
if x != nil {
|
|
return x.Info
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type Info struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
|
|
}
|
|
|
|
func (x *Info) Reset() {
|
|
*x = Info{}
|
|
if protoimpl.UnsafeEnabled {
|
|
mi := &file_example_proto_msgTypes[2]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
}
|
|
|
|
func (x *Info) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*Info) ProtoMessage() {}
|
|
|
|
func (x *Info) ProtoReflect() protoreflect.Message {
|
|
mi := &file_example_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 Info.ProtoReflect.Descriptor instead.
|
|
func (*Info) Descriptor() ([]byte, []int) {
|
|
return file_example_proto_rawDescGZIP(), []int{2}
|
|
}
|
|
|
|
func (x *Info) GetAddress() string {
|
|
if x != nil {
|
|
return x.Address
|
|
}
|
|
return ""
|
|
}
|
|
|
|
var File_example_proto protoreflect.FileDescriptor
|
|
|
|
var file_example_proto_rawDesc = []byte{
|
|
0x0a, 0x0d, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
|
|
0x0b, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 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, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69,
|
|
0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72,
|
|
0x6f, 0x74, 0x6f, 0x22, 0x21, 0x0a, 0x05, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x18, 0x0a, 0x07,
|
|
0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d,
|
|
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x88, 0x03, 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75, 0x65,
|
|
0x73, 0x74, 0x12, 0x17, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x07,
|
|
0xfa, 0x42, 0x04, 0x22, 0x02, 0x20, 0x00, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x03, 0x61,
|
|
0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x1a, 0x04, 0x10,
|
|
0x78, 0x20, 0x00, 0x52, 0x03, 0x61, 0x67, 0x65, 0x12, 0x1f, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65,
|
|
0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x2a, 0x06, 0x30, 0x01, 0x30,
|
|
0x02, 0x30, 0x03, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x25, 0x0a, 0x05, 0x73, 0x63, 0x6f,
|
|
0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x02, 0x42, 0x0f, 0xfa, 0x42, 0x0c, 0x0a, 0x0a, 0x3d,
|
|
0x00, 0x00, 0x00, 0x00, 0x3d, 0xe1, 0xfa, 0xc7, 0x42, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65,
|
|
0x12, 0x1d, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x42,
|
|
0x07, 0xfa, 0x42, 0x04, 0x6a, 0x02, 0x08, 0x01, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12,
|
|
0x21, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa,
|
|
0x42, 0x0a, 0x72, 0x08, 0x0a, 0x06, 0x2f, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x04, 0x70, 0x61,
|
|
0x74, 0x68, 0x12, 0x1e, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28,
|
|
0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x72, 0x03, 0x98, 0x01, 0x0b, 0x52, 0x05, 0x70, 0x68, 0x6f,
|
|
0x6e, 0x65, 0x12, 0x21, 0x0a, 0x07, 0x65, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x18, 0x08, 0x20,
|
|
0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x03, 0x52, 0x07, 0x65, 0x78,
|
|
0x70, 0x6c, 0x61, 0x69, 0x6e, 0x12, 0x1d, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x09, 0x20,
|
|
0x01, 0x28, 0x09, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x72, 0x04, 0x10, 0x01, 0x18, 0x0a, 0x52, 0x04,
|
|
0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x04, 0x63, 0x61, 0x72, 0x64, 0x18, 0x0a, 0x20, 0x01,
|
|
0x28, 0x09, 0x42, 0x16, 0xfa, 0x42, 0x13, 0x72, 0x11, 0x32, 0x0f, 0x28, 0x3f, 0x69, 0x29, 0x5e,
|
|
0x5b, 0x30, 0x2d, 0x39, 0x61, 0x2d, 0x66, 0x5d, 0x2b, 0x24, 0x52, 0x04, 0x63, 0x61, 0x72, 0x64,
|
|
0x12, 0x2f, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11,
|
|
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x49, 0x6e, 0x66,
|
|
0x6f, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x04, 0x69, 0x6e, 0x66,
|
|
0x6f, 0x22, 0x20, 0x0a, 0x04, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64,
|
|
0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72,
|
|
0x65, 0x73, 0x73, 0x32, 0x64, 0x0a, 0x0e, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x53, 0x65,
|
|
0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x52, 0x0a, 0x0c, 0x54, 0x65, 0x73, 0x74, 0x56, 0x61, 0x6c,
|
|
0x69, 0x64, 0x61, 0x74, 0x65, 0x12, 0x14, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x78, 0x61, 0x6d,
|
|
0x70, 0x6c, 0x65, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x61, 0x70,
|
|
0x69, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22,
|
|
0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x22, 0x0d, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x61, 0x6c,
|
|
0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x3a, 0x01, 0x2a, 0x42, 0x4c, 0x0a, 0x0f, 0x76, 0x61, 0x6c,
|
|
0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x50, 0x00, 0x5a, 0x37,
|
|
0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2d, 0x6b, 0x72,
|
|
0x61, 0x74, 0x6f, 0x73, 0x2f, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2f, 0x65, 0x78, 0x61, 0x6d,
|
|
0x70, 0x6c, 0x65, 0x73, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x61, 0x70,
|
|
0x69, 0x2f, 0x76, 0x31, 0x3b, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
|
}
|
|
|
|
var (
|
|
file_example_proto_rawDescOnce sync.Once
|
|
file_example_proto_rawDescData = file_example_proto_rawDesc
|
|
)
|
|
|
|
func file_example_proto_rawDescGZIP() []byte {
|
|
file_example_proto_rawDescOnce.Do(func() {
|
|
file_example_proto_rawDescData = protoimpl.X.CompressGZIP(file_example_proto_rawDescData)
|
|
})
|
|
return file_example_proto_rawDescData
|
|
}
|
|
|
|
var file_example_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
|
|
var file_example_proto_goTypes = []interface{}{
|
|
(*Reply)(nil), // 0: api.example.Reply
|
|
(*Request)(nil), // 1: api.example.Request
|
|
(*Info)(nil), // 2: api.example.Info
|
|
}
|
|
var file_example_proto_depIdxs = []int32{
|
|
2, // 0: api.example.Request.info:type_name -> api.example.Info
|
|
1, // 1: api.example.ExampleService.TestValidate:input_type -> api.example.Request
|
|
0, // 2: api.example.ExampleService.TestValidate:output_type -> api.example.Reply
|
|
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_example_proto_init() }
|
|
func file_example_proto_init() {
|
|
if File_example_proto != nil {
|
|
return
|
|
}
|
|
if !protoimpl.UnsafeEnabled {
|
|
file_example_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
|
switch v := v.(*Reply); i {
|
|
case 0:
|
|
return &v.state
|
|
case 1:
|
|
return &v.sizeCache
|
|
case 2:
|
|
return &v.unknownFields
|
|
default:
|
|
return nil
|
|
}
|
|
}
|
|
file_example_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
|
switch v := v.(*Request); i {
|
|
case 0:
|
|
return &v.state
|
|
case 1:
|
|
return &v.sizeCache
|
|
case 2:
|
|
return &v.unknownFields
|
|
default:
|
|
return nil
|
|
}
|
|
}
|
|
file_example_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
|
switch v := v.(*Info); 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_example_proto_rawDesc,
|
|
NumEnums: 0,
|
|
NumMessages: 3,
|
|
NumExtensions: 0,
|
|
NumServices: 1,
|
|
},
|
|
GoTypes: file_example_proto_goTypes,
|
|
DependencyIndexes: file_example_proto_depIdxs,
|
|
MessageInfos: file_example_proto_msgTypes,
|
|
}.Build()
|
|
File_example_proto = out.File
|
|
file_example_proto_rawDesc = nil
|
|
file_example_proto_goTypes = nil
|
|
file_example_proto_depIdxs = nil
|
|
}
|
|
|