| // |
| // Licensed to the Apache Software Foundation (ASF) under one or more |
| // contributor license agreements. See the NOTICE file distributed with |
| // this work for additional information regarding copyright ownership. |
| // The ASF licenses this file to You under the Apache License, Version 2.0 |
| // (the "License"); you may not use this file except in compliance with |
| // the License. You may obtain a copy of the License at |
| // |
| // http://www.apache.org/licenses/LICENSE-2.0 |
| // |
| // Unless required by applicable law or agreed to in writing, software |
| // distributed under the License is distributed on an "AS IS" BASIS, |
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| // See the License for the specific language governing permissions and |
| // limitations under the License. |
| |
| // Code generated by protoc-gen-go. DO NOT EDIT. |
| // versions: |
| // protoc-gen-go v1.36.9 |
| // protoc v6.32.1 |
| // source: benchmark.proto |
| |
| package api |
| |
| import ( |
| protoreflect "google.golang.org/protobuf/reflect/protoreflect" |
| protoimpl "google.golang.org/protobuf/runtime/protoimpl" |
| reflect "reflect" |
| sync "sync" |
| unsafe "unsafe" |
| ) |
| |
| 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) |
| ) |
| |
| // User represents a user entity |
| type User struct { |
| state protoimpl.MessageState `protogen:"open.v1"` |
| Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` |
| Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` |
| Age int32 `protobuf:"varint,3,opt,name=age,proto3" json:"age,omitempty"` |
| unknownFields protoimpl.UnknownFields |
| sizeCache protoimpl.SizeCache |
| } |
| |
| func (x *User) Reset() { |
| *x = User{} |
| mi := &file_benchmark_proto_msgTypes[0] |
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| ms.StoreMessageInfo(mi) |
| } |
| |
| func (x *User) String() string { |
| return protoimpl.X.MessageStringOf(x) |
| } |
| |
| func (*User) ProtoMessage() {} |
| |
| func (x *User) ProtoReflect() protoreflect.Message { |
| mi := &file_benchmark_proto_msgTypes[0] |
| if x != nil { |
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| if ms.LoadMessageInfo() == nil { |
| ms.StoreMessageInfo(mi) |
| } |
| return ms |
| } |
| return mi.MessageOf(x) |
| } |
| |
| // Deprecated: Use User.ProtoReflect.Descriptor instead. |
| func (*User) Descriptor() ([]byte, []int) { |
| return file_benchmark_proto_rawDescGZIP(), []int{0} |
| } |
| |
| func (x *User) GetId() int32 { |
| if x != nil { |
| return x.Id |
| } |
| return 0 |
| } |
| |
| func (x *User) GetName() string { |
| if x != nil { |
| return x.Name |
| } |
| return "" |
| } |
| |
| func (x *User) GetAge() int32 { |
| if x != nil { |
| return x.Age |
| } |
| return 0 |
| } |
| |
| // GetUserRequest is the request for GetUser |
| type GetUserRequest struct { |
| state protoimpl.MessageState `protogen:"open.v1"` |
| UserId int32 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` |
| unknownFields protoimpl.UnknownFields |
| sizeCache protoimpl.SizeCache |
| } |
| |
| func (x *GetUserRequest) Reset() { |
| *x = GetUserRequest{} |
| mi := &file_benchmark_proto_msgTypes[1] |
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| ms.StoreMessageInfo(mi) |
| } |
| |
| func (x *GetUserRequest) String() string { |
| return protoimpl.X.MessageStringOf(x) |
| } |
| |
| func (*GetUserRequest) ProtoMessage() {} |
| |
| func (x *GetUserRequest) ProtoReflect() protoreflect.Message { |
| mi := &file_benchmark_proto_msgTypes[1] |
| if x != nil { |
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| if ms.LoadMessageInfo() == nil { |
| ms.StoreMessageInfo(mi) |
| } |
| return ms |
| } |
| return mi.MessageOf(x) |
| } |
| |
| // Deprecated: Use GetUserRequest.ProtoReflect.Descriptor instead. |
| func (*GetUserRequest) Descriptor() ([]byte, []int) { |
| return file_benchmark_proto_rawDescGZIP(), []int{1} |
| } |
| |
| func (x *GetUserRequest) GetUserId() int32 { |
| if x != nil { |
| return x.UserId |
| } |
| return 0 |
| } |
| |
| // GetUsersRequest is the request for GetUsers |
| type GetUsersRequest struct { |
| state protoimpl.MessageState `protogen:"open.v1"` |
| UserIds []int32 `protobuf:"varint,1,rep,packed,name=user_ids,json=userIds,proto3" json:"user_ids,omitempty"` |
| unknownFields protoimpl.UnknownFields |
| sizeCache protoimpl.SizeCache |
| } |
| |
| func (x *GetUsersRequest) Reset() { |
| *x = GetUsersRequest{} |
| mi := &file_benchmark_proto_msgTypes[2] |
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| ms.StoreMessageInfo(mi) |
| } |
| |
| func (x *GetUsersRequest) String() string { |
| return protoimpl.X.MessageStringOf(x) |
| } |
| |
| func (*GetUsersRequest) ProtoMessage() {} |
| |
| func (x *GetUsersRequest) ProtoReflect() protoreflect.Message { |
| mi := &file_benchmark_proto_msgTypes[2] |
| if x != nil { |
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| if ms.LoadMessageInfo() == nil { |
| ms.StoreMessageInfo(mi) |
| } |
| return ms |
| } |
| return mi.MessageOf(x) |
| } |
| |
| // Deprecated: Use GetUsersRequest.ProtoReflect.Descriptor instead. |
| func (*GetUsersRequest) Descriptor() ([]byte, []int) { |
| return file_benchmark_proto_rawDescGZIP(), []int{2} |
| } |
| |
| func (x *GetUsersRequest) GetUserIds() []int32 { |
| if x != nil { |
| return x.UserIds |
| } |
| return nil |
| } |
| |
| // GetUserByNameRequest is the request for GetUserByName |
| type GetUserByNameRequest struct { |
| state protoimpl.MessageState `protogen:"open.v1"` |
| Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` |
| unknownFields protoimpl.UnknownFields |
| sizeCache protoimpl.SizeCache |
| } |
| |
| func (x *GetUserByNameRequest) Reset() { |
| *x = GetUserByNameRequest{} |
| mi := &file_benchmark_proto_msgTypes[3] |
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| ms.StoreMessageInfo(mi) |
| } |
| |
| func (x *GetUserByNameRequest) String() string { |
| return protoimpl.X.MessageStringOf(x) |
| } |
| |
| func (*GetUserByNameRequest) ProtoMessage() {} |
| |
| func (x *GetUserByNameRequest) ProtoReflect() protoreflect.Message { |
| mi := &file_benchmark_proto_msgTypes[3] |
| if x != nil { |
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| if ms.LoadMessageInfo() == nil { |
| ms.StoreMessageInfo(mi) |
| } |
| return ms |
| } |
| return mi.MessageOf(x) |
| } |
| |
| // Deprecated: Use GetUserByNameRequest.ProtoReflect.Descriptor instead. |
| func (*GetUserByNameRequest) Descriptor() ([]byte, []int) { |
| return file_benchmark_proto_rawDescGZIP(), []int{3} |
| } |
| |
| func (x *GetUserByNameRequest) GetName() string { |
| if x != nil { |
| return x.Name |
| } |
| return "" |
| } |
| |
| // GetUsersResponse is the response containing users |
| type GetUsersResponse struct { |
| state protoimpl.MessageState `protogen:"open.v1"` |
| Users []*User `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"` |
| unknownFields protoimpl.UnknownFields |
| sizeCache protoimpl.SizeCache |
| } |
| |
| func (x *GetUsersResponse) Reset() { |
| *x = GetUsersResponse{} |
| mi := &file_benchmark_proto_msgTypes[4] |
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| ms.StoreMessageInfo(mi) |
| } |
| |
| func (x *GetUsersResponse) String() string { |
| return protoimpl.X.MessageStringOf(x) |
| } |
| |
| func (*GetUsersResponse) ProtoMessage() {} |
| |
| func (x *GetUsersResponse) ProtoReflect() protoreflect.Message { |
| mi := &file_benchmark_proto_msgTypes[4] |
| if x != nil { |
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| if ms.LoadMessageInfo() == nil { |
| ms.StoreMessageInfo(mi) |
| } |
| return ms |
| } |
| return mi.MessageOf(x) |
| } |
| |
| // Deprecated: Use GetUsersResponse.ProtoReflect.Descriptor instead. |
| func (*GetUsersResponse) Descriptor() ([]byte, []int) { |
| return file_benchmark_proto_rawDescGZIP(), []int{4} |
| } |
| |
| func (x *GetUsersResponse) GetUsers() []*User { |
| if x != nil { |
| return x.Users |
| } |
| return nil |
| } |
| |
| // HelloRequest is the request for SayHello |
| type HelloRequest struct { |
| state protoimpl.MessageState `protogen:"open.v1"` |
| Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` |
| unknownFields protoimpl.UnknownFields |
| sizeCache protoimpl.SizeCache |
| } |
| |
| func (x *HelloRequest) Reset() { |
| *x = HelloRequest{} |
| mi := &file_benchmark_proto_msgTypes[5] |
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| ms.StoreMessageInfo(mi) |
| } |
| |
| func (x *HelloRequest) String() string { |
| return protoimpl.X.MessageStringOf(x) |
| } |
| |
| func (*HelloRequest) ProtoMessage() {} |
| |
| func (x *HelloRequest) ProtoReflect() protoreflect.Message { |
| mi := &file_benchmark_proto_msgTypes[5] |
| if x != nil { |
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| if ms.LoadMessageInfo() == nil { |
| ms.StoreMessageInfo(mi) |
| } |
| return ms |
| } |
| return mi.MessageOf(x) |
| } |
| |
| // Deprecated: Use HelloRequest.ProtoReflect.Descriptor instead. |
| func (*HelloRequest) Descriptor() ([]byte, []int) { |
| return file_benchmark_proto_rawDescGZIP(), []int{5} |
| } |
| |
| func (x *HelloRequest) GetName() string { |
| if x != nil { |
| return x.Name |
| } |
| return "" |
| } |
| |
| // HelloResponse is the response for SayHello |
| type HelloResponse struct { |
| state protoimpl.MessageState `protogen:"open.v1"` |
| Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` |
| unknownFields protoimpl.UnknownFields |
| sizeCache protoimpl.SizeCache |
| } |
| |
| func (x *HelloResponse) Reset() { |
| *x = HelloResponse{} |
| mi := &file_benchmark_proto_msgTypes[6] |
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| ms.StoreMessageInfo(mi) |
| } |
| |
| func (x *HelloResponse) String() string { |
| return protoimpl.X.MessageStringOf(x) |
| } |
| |
| func (*HelloResponse) ProtoMessage() {} |
| |
| func (x *HelloResponse) ProtoReflect() protoreflect.Message { |
| mi := &file_benchmark_proto_msgTypes[6] |
| if x != nil { |
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| if ms.LoadMessageInfo() == nil { |
| ms.StoreMessageInfo(mi) |
| } |
| return ms |
| } |
| return mi.MessageOf(x) |
| } |
| |
| // Deprecated: Use HelloResponse.ProtoReflect.Descriptor instead. |
| func (*HelloResponse) Descriptor() ([]byte, []int) { |
| return file_benchmark_proto_rawDescGZIP(), []int{6} |
| } |
| |
| func (x *HelloResponse) GetMessage() string { |
| if x != nil { |
| return x.Message |
| } |
| return "" |
| } |
| |
| var File_benchmark_proto protoreflect.FileDescriptor |
| |
| const file_benchmark_proto_rawDesc = "" + |
| "\n" + |
| "\x0fbenchmark.proto\x12\tbenchmark\"<\n" + |
| "\x04User\x12\x0e\n" + |
| "\x02id\x18\x01 \x01(\x05R\x02id\x12\x12\n" + |
| "\x04name\x18\x02 \x01(\tR\x04name\x12\x10\n" + |
| "\x03age\x18\x03 \x01(\x05R\x03age\")\n" + |
| "\x0eGetUserRequest\x12\x17\n" + |
| "\auser_id\x18\x01 \x01(\x05R\x06userId\",\n" + |
| "\x0fGetUsersRequest\x12\x19\n" + |
| "\buser_ids\x18\x01 \x03(\x05R\auserIds\"*\n" + |
| "\x14GetUserByNameRequest\x12\x12\n" + |
| "\x04name\x18\x01 \x01(\tR\x04name\"9\n" + |
| "\x10GetUsersResponse\x12%\n" + |
| "\x05users\x18\x01 \x03(\v2\x0f.benchmark.UserR\x05users\"\"\n" + |
| "\fHelloRequest\x12\x12\n" + |
| "\x04name\x18\x01 \x01(\tR\x04name\")\n" + |
| "\rHelloResponse\x12\x18\n" + |
| "\amessage\x18\x01 \x01(\tR\amessage2\xa8\x02\n" + |
| "\x10BenchmarkService\x12A\n" + |
| "\aGetUser\x12\x19.benchmark.GetUserRequest\x1a\x1b.benchmark.GetUsersResponse\x12C\n" + |
| "\bGetUsers\x12\x1a.benchmark.GetUsersRequest\x1a\x1b.benchmark.GetUsersResponse\x12M\n" + |
| "\rGetUserByName\x12\x1f.benchmark.GetUserByNameRequest\x1a\x1b.benchmark.GetUsersResponse\x12=\n" + |
| "\bSayHello\x12\x17.benchmark.HelloRequest\x1a\x18.benchmark.HelloResponseB:Z8github.com/apache/dubbo-go-pixiu/tools/benchmark/api;apib\x06proto3" |
| |
| var ( |
| file_benchmark_proto_rawDescOnce sync.Once |
| file_benchmark_proto_rawDescData []byte |
| ) |
| |
| func file_benchmark_proto_rawDescGZIP() []byte { |
| file_benchmark_proto_rawDescOnce.Do(func() { |
| file_benchmark_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_benchmark_proto_rawDesc), len(file_benchmark_proto_rawDesc))) |
| }) |
| return file_benchmark_proto_rawDescData |
| } |
| |
| var file_benchmark_proto_msgTypes = make([]protoimpl.MessageInfo, 7) |
| var file_benchmark_proto_goTypes = []any{ |
| (*User)(nil), // 0: benchmark.User |
| (*GetUserRequest)(nil), // 1: benchmark.GetUserRequest |
| (*GetUsersRequest)(nil), // 2: benchmark.GetUsersRequest |
| (*GetUserByNameRequest)(nil), // 3: benchmark.GetUserByNameRequest |
| (*GetUsersResponse)(nil), // 4: benchmark.GetUsersResponse |
| (*HelloRequest)(nil), // 5: benchmark.HelloRequest |
| (*HelloResponse)(nil), // 6: benchmark.HelloResponse |
| } |
| var file_benchmark_proto_depIdxs = []int32{ |
| 0, // 0: benchmark.GetUsersResponse.users:type_name -> benchmark.User |
| 1, // 1: benchmark.BenchmarkService.GetUser:input_type -> benchmark.GetUserRequest |
| 2, // 2: benchmark.BenchmarkService.GetUsers:input_type -> benchmark.GetUsersRequest |
| 3, // 3: benchmark.BenchmarkService.GetUserByName:input_type -> benchmark.GetUserByNameRequest |
| 5, // 4: benchmark.BenchmarkService.SayHello:input_type -> benchmark.HelloRequest |
| 4, // 5: benchmark.BenchmarkService.GetUser:output_type -> benchmark.GetUsersResponse |
| 4, // 6: benchmark.BenchmarkService.GetUsers:output_type -> benchmark.GetUsersResponse |
| 4, // 7: benchmark.BenchmarkService.GetUserByName:output_type -> benchmark.GetUsersResponse |
| 6, // 8: benchmark.BenchmarkService.SayHello:output_type -> benchmark.HelloResponse |
| 5, // [5:9] is the sub-list for method output_type |
| 1, // [1:5] 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_benchmark_proto_init() } |
| func file_benchmark_proto_init() { |
| if File_benchmark_proto != nil { |
| return |
| } |
| type x struct{} |
| out := protoimpl.TypeBuilder{ |
| File: protoimpl.DescBuilder{ |
| GoPackagePath: reflect.TypeOf(x{}).PkgPath(), |
| RawDescriptor: unsafe.Slice(unsafe.StringData(file_benchmark_proto_rawDesc), len(file_benchmark_proto_rawDesc)), |
| NumEnums: 0, |
| NumMessages: 7, |
| NumExtensions: 0, |
| NumServices: 1, |
| }, |
| GoTypes: file_benchmark_proto_goTypes, |
| DependencyIndexes: file_benchmark_proto_depIdxs, |
| MessageInfos: file_benchmark_proto_msgTypes, |
| }.Build() |
| File_benchmark_proto = out.File |
| file_benchmark_proto_goTypes = nil |
| file_benchmark_proto_depIdxs = nil |
| } |