Debian Codegraph @

internal/testserver/testserver.pb.go

raw
1 //
2 //
3 // Copyright 2021 gRPC authors.
4 //
5 // Licensed under the Apache License, Version 2.0 (the "License");
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 // http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17
18 // Code generated by protoc-gen-go. DO NOT EDIT.
19 // versions:
20 // protoc-gen-go v1.26.0
21 // protoc v3.14.0
22 // source: internal/testserver/testserver.proto
23
24 package testserver
25
26 import (
27 context "context"
28 grpc "google.golang.org/grpc"
29 codes "google.golang.org/grpc/codes"
30 status "google.golang.org/grpc/status"
31 protoreflect "google.golang.org/protobuf/reflect/protoreflect"
32 protoimpl "google.golang.org/protobuf/runtime/protoimpl"
33 reflect "reflect"
34 sync "sync"
35 )
36
37 const (
38 // Verify that this generated code is sufficiently up-to-date.
39 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
40 // Verify that runtime/protoimpl is sufficiently up-to-date.
41 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
42 )
43
44 // The request message containing the user's name.
45 type MessageRequest struct {
46 state protoimpl.MessageState
47 sizeCache protoimpl.SizeCache
48 unknownFields protoimpl.UnknownFields
49
50 Request string `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"`
51 }
52
53 func (x *MessageRequest) Reset() {
54 *x = MessageRequest{}
55 if protoimpl.UnsafeEnabled {
56 mi := &file_internal_testserver_testserver_proto_msgTypes[0]
57 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
58 ms.StoreMessageInfo(mi)
59 }
60 }
61
62 func (x *MessageRequest) String() string {
63 return protoimpl.X.MessageStringOf(x)
64 }
65
66 func (*MessageRequest) ProtoMessage() {}
67
68 func (x *MessageRequest) ProtoReflect() protoreflect.Message {
69 mi := &file_internal_testserver_testserver_proto_msgTypes[0]
70 if protoimpl.UnsafeEnabled && x != nil {
71 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
72 if ms.LoadMessageInfo() == nil {
73 ms.StoreMessageInfo(mi)
74 }
75 return ms
76 }
77 return mi.MessageOf(x)
78 }
79
80 // Deprecated: Use MessageRequest.ProtoReflect.Descriptor instead.
81 func (*MessageRequest) Descriptor() ([]byte, []int) {
82 return file_internal_testserver_testserver_proto_rawDescGZIP(), []int{0}
83 }
84
85 func (x *MessageRequest) GetRequest() string {
86 if x != nil {
87 return x.Request
88 }
89 return ""
90 }
91
92 // The response message containing the greetings
93 type MessageReply struct {
94 state protoimpl.MessageState
95 sizeCache protoimpl.SizeCache
96 unknownFields protoimpl.UnknownFields
97
98 Response string `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"`
99 }
100
101 func (x *MessageReply) Reset() {
102 *x = MessageReply{}
103 if protoimpl.UnsafeEnabled {
104 mi := &file_internal_testserver_testserver_proto_msgTypes[1]
105 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
106 ms.StoreMessageInfo(mi)
107 }
108 }
109
110 func (x *MessageReply) String() string {
111 return protoimpl.X.MessageStringOf(x)
112 }
113
114 func (*MessageReply) ProtoMessage() {}
115
116 func (x *MessageReply) ProtoReflect() protoreflect.Message {
117 mi := &file_internal_testserver_testserver_proto_msgTypes[1]
118 if protoimpl.UnsafeEnabled && x != nil {
119 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
120 if ms.LoadMessageInfo() == nil {
121 ms.StoreMessageInfo(mi)
122 }
123 return ms
124 }
125 return mi.MessageOf(x)
126 }
127
128 // Deprecated: Use MessageReply.ProtoReflect.Descriptor instead.
129 func (*MessageReply) Descriptor() ([]byte, []int) {
130 return file_internal_testserver_testserver_proto_rawDescGZIP(), []int{1}
131 }
132
133 func (x *MessageReply) GetResponse() string {
134 if x != nil {
135 return x.Response
136 }
137 return ""
138 }
139
140 var File_internal_testserver_testserver_proto protoreflect.FileDescriptor
141
142 var file_internal_testserver_testserver_proto_rawDesc = []byte{
143 0x0a, 0x24, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x73,
144 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72,
145 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x77, 0x6f, 0x72,
146 0x6c, 0x64, 0x22, 0x2a, 0x0a, 0x0e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71,
147 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18,
148 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x2a,
149 0x0a, 0x0c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x1a,
150 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
151 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x53, 0x0a, 0x0a, 0x54, 0x65,
152 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x45, 0x0a, 0x0b, 0x53, 0x65, 0x6e, 0x64,
153 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1a, 0x2e, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x77,
154 0x6f, 0x72, 0x6c, 0x64, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75,
155 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x77, 0x6f, 0x72, 0x6c, 0x64,
156 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x42,
157 0x15, 0x5a, 0x13, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x74, 0x65, 0x73, 0x74,
158 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
159 }
160
161 var (
162 file_internal_testserver_testserver_proto_rawDescOnce sync.Once
163 file_internal_testserver_testserver_proto_rawDescData = file_internal_testserver_testserver_proto_rawDesc
164 )
165
166 func file_internal_testserver_testserver_proto_rawDescGZIP() []byte {
167 file_internal_testserver_testserver_proto_rawDescOnce.Do(func() {
168 file_internal_testserver_testserver_proto_rawDescData = protoimpl.X.CompressGZIP(file_internal_testserver_testserver_proto_rawDescData)
169 })
170 return file_internal_testserver_testserver_proto_rawDescData
171 }
172
173 var file_internal_testserver_testserver_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
174 var file_internal_testserver_testserver_proto_goTypes = []interface{}{
175 (*MessageRequest)(nil), // 0: helloworld.MessageRequest
176 (*MessageReply)(nil), // 1: helloworld.MessageReply
177 }
178 var file_internal_testserver_testserver_proto_depIdxs = []int32{
179 0, // 0: helloworld.TestServer.SendMessage:input_type -> helloworld.MessageRequest
180 1, // 1: helloworld.TestServer.SendMessage:output_type -> helloworld.MessageReply
181 1, // [1:2] is the sub-list for method output_type
182 0, // [0:1] is the sub-list for method input_type
183 0, // [0:0] is the sub-list for extension type_name
184 0, // [0:0] is the sub-list for extension extendee
185 0, // [0:0] is the sub-list for field type_name
186 }
187
188 func init() { file_internal_testserver_testserver_proto_init() }
189 func file_internal_testserver_testserver_proto_init() {
190 if File_internal_testserver_testserver_proto != nil {
191 return
192 }
193 if !protoimpl.UnsafeEnabled {
194 file_internal_testserver_testserver_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
195 switch v := v.(*MessageRequest); i {
196 case 0:
197 return &v.state
198 case 1:
199 return &v.sizeCache
200 case 2:
201 return &v.unknownFields
202 default:
203 return nil
204 }
205 }
206 file_internal_testserver_testserver_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
207 switch v := v.(*MessageReply); i {
208 case 0:
209 return &v.state
210 case 1:
211 return &v.sizeCache
212 case 2:
213 return &v.unknownFields
214 default:
215 return nil
216 }
217 }
218 }
219 type x struct{}
220 out := protoimpl.TypeBuilder{
221 File: protoimpl.DescBuilder{
222 GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
223 RawDescriptor: file_internal_testserver_testserver_proto_rawDesc,
224 NumEnums: 0,
225 NumMessages: 2,
226 NumExtensions: 0,
227 NumServices: 1,
228 },
229 GoTypes: file_internal_testserver_testserver_proto_goTypes,
230 DependencyIndexes: file_internal_testserver_testserver_proto_depIdxs,
231 MessageInfos: file_internal_testserver_testserver_proto_msgTypes,
232 }.Build()
233 File_internal_testserver_testserver_proto = out.File
234 file_internal_testserver_testserver_proto_rawDesc = nil
235 file_internal_testserver_testserver_proto_goTypes = nil
236 file_internal_testserver_testserver_proto_depIdxs = nil
237 }
238
239 // Reference imports to suppress errors if they are not otherwise used.
240 var _ context.Context
241 var _ grpc.ClientConnInterface
242
243 // This is a compile-time assertion to ensure that this generated file
244 // is compatible with the grpc package it is being compiled against.
245 const _ = grpc.SupportPackageIsVersion6
246
247 // TestServerClient is the client API for TestServer service.
248 //
249 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
250 type TestServerClient interface {
251 // Sends a greeting
252 SendMessage(ctx context.Context, in *MessageRequest, opts ...grpc.CallOption) (*MessageReply, error)
253 }
254
255 type testServerClient struct {
256 cc grpc.ClientConnInterface
257 }
258
259 func NewTestServerClient(cc grpc.ClientConnInterface) TestServerClient {
260 return &testServerClient{cc}
261 }
262
263 func (c *testServerClient) SendMessage(ctx context.Context, in *MessageRequest, opts ...grpc.CallOption) (*MessageReply, error) {
264 out := new(MessageReply)
265 err := c.cc.Invoke(ctx, "/helloworld.TestServer/SendMessage", in, out, opts...)
266 if err != nil {
267 return nil, err
268 }
269 return out, nil
270 }
271
272 // TestServerServer is the server API for TestServer service.
273 type TestServerServer interface {
274 // Sends a greeting
275 SendMessage(context.Context, *MessageRequest) (*MessageReply, error)
276 }
277
278 // UnimplementedTestServerServer can be embedded to have forward compatible implementations.
279 type UnimplementedTestServerServer struct {
280 }
281
282 func (*UnimplementedTestServerServer) SendMessage(context.Context, *MessageRequest) (*MessageReply, error) {
283 return nil, status.Errorf(codes.Unimplemented, "method SendMessage not implemented")
284 }
285
286 func RegisterTestServerServer(s *grpc.Server, srv TestServerServer) {
287 s.RegisterService(&_TestServer_serviceDesc, srv)
288 }
289
290 func _TestServer_SendMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
291 in := new(MessageRequest)
292 if err := dec(in); err != nil {
293 return nil, err
294 }
295 if interceptor == nil {
296 return srv.(TestServerServer).SendMessage(ctx, in)
297 }
298 info := &grpc.UnaryServerInfo{
299 Server: srv,
300 FullMethod: "/helloworld.TestServer/SendMessage",
301 }
302 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
303 return srv.(TestServerServer).SendMessage(ctx, req.(*MessageRequest))
304 }
305 return interceptor(ctx, in, info, handler)
306 }
307
308 var _TestServer_serviceDesc = grpc.ServiceDesc{
309 ServiceName: "helloworld.TestServer",
310 HandlerType: (*TestServerServer)(nil),
311 Methods: []grpc.MethodDesc{
312 {
313 MethodName: "SendMessage",
314 Handler: _TestServer_SendMessage_Handler,
315 },
316 },
317 Streams: []grpc.StreamDesc{},
318 Metadata: "internal/testserver/testserver.proto",
319 }