github.com/kubeshop/testkube@v1.17.23/pkg/cloud/service_grpc.pb.go (about) 1 // Code generated by protoc-gen-go-grpc. DO NOT EDIT. 2 // versions: 3 // - protoc-gen-go-grpc v1.2.0 4 // - protoc v3.19.4 5 // source: proto/service.proto 6 7 package cloud 8 9 import ( 10 context "context" 11 grpc "google.golang.org/grpc" 12 codes "google.golang.org/grpc/codes" 13 status "google.golang.org/grpc/status" 14 emptypb "google.golang.org/protobuf/types/known/emptypb" 15 ) 16 17 // This is a compile-time assertion to ensure that this generated file 18 // is compatible with the grpc package it is being compiled against. 19 // Requires gRPC-Go v1.32.0 or later. 20 const _ = grpc.SupportPackageIsVersion7 21 22 // TestKubeCloudAPIClient is the client API for TestKubeCloudAPI service. 23 // 24 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. 25 type TestKubeCloudAPIClient interface { 26 // Deprecated, use ExecuteAsync instead, 27 // Will remove this after we fully migrate to ExecuteAsync. 28 Execute(ctx context.Context, opts ...grpc.CallOption) (TestKubeCloudAPI_ExecuteClient, error) 29 Send(ctx context.Context, opts ...grpc.CallOption) (TestKubeCloudAPI_SendClient, error) 30 Call(ctx context.Context, in *CommandRequest, opts ...grpc.CallOption) (*CommandResponse, error) 31 ExecuteAsync(ctx context.Context, opts ...grpc.CallOption) (TestKubeCloudAPI_ExecuteAsyncClient, error) 32 GetLogsStream(ctx context.Context, opts ...grpc.CallOption) (TestKubeCloudAPI_GetLogsStreamClient, error) 33 GetTestWorkflowNotificationsStream(ctx context.Context, opts ...grpc.CallOption) (TestKubeCloudAPI_GetTestWorkflowNotificationsStreamClient, error) 34 } 35 36 type testKubeCloudAPIClient struct { 37 cc grpc.ClientConnInterface 38 } 39 40 func NewTestKubeCloudAPIClient(cc grpc.ClientConnInterface) TestKubeCloudAPIClient { 41 return &testKubeCloudAPIClient{cc} 42 } 43 44 func (c *testKubeCloudAPIClient) Execute(ctx context.Context, opts ...grpc.CallOption) (TestKubeCloudAPI_ExecuteClient, error) { 45 stream, err := c.cc.NewStream(ctx, &TestKubeCloudAPI_ServiceDesc.Streams[0], "/cloud.TestKubeCloudAPI/Execute", opts...) 46 if err != nil { 47 return nil, err 48 } 49 x := &testKubeCloudAPIExecuteClient{stream} 50 return x, nil 51 } 52 53 type TestKubeCloudAPI_ExecuteClient interface { 54 Send(*ExecuteResponse) error 55 Recv() (*ExecuteRequest, error) 56 grpc.ClientStream 57 } 58 59 type testKubeCloudAPIExecuteClient struct { 60 grpc.ClientStream 61 } 62 63 func (x *testKubeCloudAPIExecuteClient) Send(m *ExecuteResponse) error { 64 return x.ClientStream.SendMsg(m) 65 } 66 67 func (x *testKubeCloudAPIExecuteClient) Recv() (*ExecuteRequest, error) { 68 m := new(ExecuteRequest) 69 if err := x.ClientStream.RecvMsg(m); err != nil { 70 return nil, err 71 } 72 return m, nil 73 } 74 75 func (c *testKubeCloudAPIClient) Send(ctx context.Context, opts ...grpc.CallOption) (TestKubeCloudAPI_SendClient, error) { 76 stream, err := c.cc.NewStream(ctx, &TestKubeCloudAPI_ServiceDesc.Streams[1], "/cloud.TestKubeCloudAPI/Send", opts...) 77 if err != nil { 78 return nil, err 79 } 80 x := &testKubeCloudAPISendClient{stream} 81 return x, nil 82 } 83 84 type TestKubeCloudAPI_SendClient interface { 85 Send(*WebsocketData) error 86 CloseAndRecv() (*emptypb.Empty, error) 87 grpc.ClientStream 88 } 89 90 type testKubeCloudAPISendClient struct { 91 grpc.ClientStream 92 } 93 94 func (x *testKubeCloudAPISendClient) Send(m *WebsocketData) error { 95 return x.ClientStream.SendMsg(m) 96 } 97 98 func (x *testKubeCloudAPISendClient) CloseAndRecv() (*emptypb.Empty, error) { 99 if err := x.ClientStream.CloseSend(); err != nil { 100 return nil, err 101 } 102 m := new(emptypb.Empty) 103 if err := x.ClientStream.RecvMsg(m); err != nil { 104 return nil, err 105 } 106 return m, nil 107 } 108 109 func (c *testKubeCloudAPIClient) Call(ctx context.Context, in *CommandRequest, opts ...grpc.CallOption) (*CommandResponse, error) { 110 out := new(CommandResponse) 111 err := c.cc.Invoke(ctx, "/cloud.TestKubeCloudAPI/Call", in, out, opts...) 112 if err != nil { 113 return nil, err 114 } 115 return out, nil 116 } 117 118 func (c *testKubeCloudAPIClient) ExecuteAsync(ctx context.Context, opts ...grpc.CallOption) (TestKubeCloudAPI_ExecuteAsyncClient, error) { 119 stream, err := c.cc.NewStream(ctx, &TestKubeCloudAPI_ServiceDesc.Streams[2], "/cloud.TestKubeCloudAPI/ExecuteAsync", opts...) 120 if err != nil { 121 return nil, err 122 } 123 x := &testKubeCloudAPIExecuteAsyncClient{stream} 124 return x, nil 125 } 126 127 type TestKubeCloudAPI_ExecuteAsyncClient interface { 128 Send(*ExecuteResponse) error 129 Recv() (*ExecuteRequest, error) 130 grpc.ClientStream 131 } 132 133 type testKubeCloudAPIExecuteAsyncClient struct { 134 grpc.ClientStream 135 } 136 137 func (x *testKubeCloudAPIExecuteAsyncClient) Send(m *ExecuteResponse) error { 138 return x.ClientStream.SendMsg(m) 139 } 140 141 func (x *testKubeCloudAPIExecuteAsyncClient) Recv() (*ExecuteRequest, error) { 142 m := new(ExecuteRequest) 143 if err := x.ClientStream.RecvMsg(m); err != nil { 144 return nil, err 145 } 146 return m, nil 147 } 148 149 func (c *testKubeCloudAPIClient) GetLogsStream(ctx context.Context, opts ...grpc.CallOption) (TestKubeCloudAPI_GetLogsStreamClient, error) { 150 stream, err := c.cc.NewStream(ctx, &TestKubeCloudAPI_ServiceDesc.Streams[3], "/cloud.TestKubeCloudAPI/GetLogsStream", opts...) 151 if err != nil { 152 return nil, err 153 } 154 x := &testKubeCloudAPIGetLogsStreamClient{stream} 155 return x, nil 156 } 157 158 type TestKubeCloudAPI_GetLogsStreamClient interface { 159 Send(*LogsStreamResponse) error 160 Recv() (*LogsStreamRequest, error) 161 grpc.ClientStream 162 } 163 164 type testKubeCloudAPIGetLogsStreamClient struct { 165 grpc.ClientStream 166 } 167 168 func (x *testKubeCloudAPIGetLogsStreamClient) Send(m *LogsStreamResponse) error { 169 return x.ClientStream.SendMsg(m) 170 } 171 172 func (x *testKubeCloudAPIGetLogsStreamClient) Recv() (*LogsStreamRequest, error) { 173 m := new(LogsStreamRequest) 174 if err := x.ClientStream.RecvMsg(m); err != nil { 175 return nil, err 176 } 177 return m, nil 178 } 179 180 func (c *testKubeCloudAPIClient) GetTestWorkflowNotificationsStream(ctx context.Context, opts ...grpc.CallOption) (TestKubeCloudAPI_GetTestWorkflowNotificationsStreamClient, error) { 181 stream, err := c.cc.NewStream(ctx, &TestKubeCloudAPI_ServiceDesc.Streams[4], "/cloud.TestKubeCloudAPI/GetTestWorkflowNotificationsStream", opts...) 182 if err != nil { 183 return nil, err 184 } 185 x := &testKubeCloudAPIGetTestWorkflowNotificationsStreamClient{stream} 186 return x, nil 187 } 188 189 type TestKubeCloudAPI_GetTestWorkflowNotificationsStreamClient interface { 190 Send(*TestWorkflowNotificationsResponse) error 191 Recv() (*TestWorkflowNotificationsRequest, error) 192 grpc.ClientStream 193 } 194 195 type testKubeCloudAPIGetTestWorkflowNotificationsStreamClient struct { 196 grpc.ClientStream 197 } 198 199 func (x *testKubeCloudAPIGetTestWorkflowNotificationsStreamClient) Send(m *TestWorkflowNotificationsResponse) error { 200 return x.ClientStream.SendMsg(m) 201 } 202 203 func (x *testKubeCloudAPIGetTestWorkflowNotificationsStreamClient) Recv() (*TestWorkflowNotificationsRequest, error) { 204 m := new(TestWorkflowNotificationsRequest) 205 if err := x.ClientStream.RecvMsg(m); err != nil { 206 return nil, err 207 } 208 return m, nil 209 } 210 211 // TestKubeCloudAPIServer is the server API for TestKubeCloudAPI service. 212 // All implementations must embed UnimplementedTestKubeCloudAPIServer 213 // for forward compatibility 214 type TestKubeCloudAPIServer interface { 215 // Deprecated, use ExecuteAsync instead, 216 // Will remove this after we fully migrate to ExecuteAsync. 217 Execute(TestKubeCloudAPI_ExecuteServer) error 218 Send(TestKubeCloudAPI_SendServer) error 219 Call(context.Context, *CommandRequest) (*CommandResponse, error) 220 ExecuteAsync(TestKubeCloudAPI_ExecuteAsyncServer) error 221 GetLogsStream(TestKubeCloudAPI_GetLogsStreamServer) error 222 GetTestWorkflowNotificationsStream(TestKubeCloudAPI_GetTestWorkflowNotificationsStreamServer) error 223 mustEmbedUnimplementedTestKubeCloudAPIServer() 224 } 225 226 // UnimplementedTestKubeCloudAPIServer must be embedded to have forward compatible implementations. 227 type UnimplementedTestKubeCloudAPIServer struct { 228 } 229 230 func (UnimplementedTestKubeCloudAPIServer) Execute(TestKubeCloudAPI_ExecuteServer) error { 231 return status.Errorf(codes.Unimplemented, "method Execute not implemented") 232 } 233 func (UnimplementedTestKubeCloudAPIServer) Send(TestKubeCloudAPI_SendServer) error { 234 return status.Errorf(codes.Unimplemented, "method Send not implemented") 235 } 236 func (UnimplementedTestKubeCloudAPIServer) Call(context.Context, *CommandRequest) (*CommandResponse, error) { 237 return nil, status.Errorf(codes.Unimplemented, "method Call not implemented") 238 } 239 func (UnimplementedTestKubeCloudAPIServer) ExecuteAsync(TestKubeCloudAPI_ExecuteAsyncServer) error { 240 return status.Errorf(codes.Unimplemented, "method ExecuteAsync not implemented") 241 } 242 func (UnimplementedTestKubeCloudAPIServer) GetLogsStream(TestKubeCloudAPI_GetLogsStreamServer) error { 243 return status.Errorf(codes.Unimplemented, "method GetLogsStream not implemented") 244 } 245 func (UnimplementedTestKubeCloudAPIServer) GetTestWorkflowNotificationsStream(TestKubeCloudAPI_GetTestWorkflowNotificationsStreamServer) error { 246 return status.Errorf(codes.Unimplemented, "method GetTestWorkflowNotificationsStream not implemented") 247 } 248 func (UnimplementedTestKubeCloudAPIServer) mustEmbedUnimplementedTestKubeCloudAPIServer() {} 249 250 // UnsafeTestKubeCloudAPIServer may be embedded to opt out of forward compatibility for this service. 251 // Use of this interface is not recommended, as added methods to TestKubeCloudAPIServer will 252 // result in compilation errors. 253 type UnsafeTestKubeCloudAPIServer interface { 254 mustEmbedUnimplementedTestKubeCloudAPIServer() 255 } 256 257 func RegisterTestKubeCloudAPIServer(s grpc.ServiceRegistrar, srv TestKubeCloudAPIServer) { 258 s.RegisterService(&TestKubeCloudAPI_ServiceDesc, srv) 259 } 260 261 func _TestKubeCloudAPI_Execute_Handler(srv interface{}, stream grpc.ServerStream) error { 262 return srv.(TestKubeCloudAPIServer).Execute(&testKubeCloudAPIExecuteServer{stream}) 263 } 264 265 type TestKubeCloudAPI_ExecuteServer interface { 266 Send(*ExecuteRequest) error 267 Recv() (*ExecuteResponse, error) 268 grpc.ServerStream 269 } 270 271 type testKubeCloudAPIExecuteServer struct { 272 grpc.ServerStream 273 } 274 275 func (x *testKubeCloudAPIExecuteServer) Send(m *ExecuteRequest) error { 276 return x.ServerStream.SendMsg(m) 277 } 278 279 func (x *testKubeCloudAPIExecuteServer) Recv() (*ExecuteResponse, error) { 280 m := new(ExecuteResponse) 281 if err := x.ServerStream.RecvMsg(m); err != nil { 282 return nil, err 283 } 284 return m, nil 285 } 286 287 func _TestKubeCloudAPI_Send_Handler(srv interface{}, stream grpc.ServerStream) error { 288 return srv.(TestKubeCloudAPIServer).Send(&testKubeCloudAPISendServer{stream}) 289 } 290 291 type TestKubeCloudAPI_SendServer interface { 292 SendAndClose(*emptypb.Empty) error 293 Recv() (*WebsocketData, error) 294 grpc.ServerStream 295 } 296 297 type testKubeCloudAPISendServer struct { 298 grpc.ServerStream 299 } 300 301 func (x *testKubeCloudAPISendServer) SendAndClose(m *emptypb.Empty) error { 302 return x.ServerStream.SendMsg(m) 303 } 304 305 func (x *testKubeCloudAPISendServer) Recv() (*WebsocketData, error) { 306 m := new(WebsocketData) 307 if err := x.ServerStream.RecvMsg(m); err != nil { 308 return nil, err 309 } 310 return m, nil 311 } 312 313 func _TestKubeCloudAPI_Call_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 314 in := new(CommandRequest) 315 if err := dec(in); err != nil { 316 return nil, err 317 } 318 if interceptor == nil { 319 return srv.(TestKubeCloudAPIServer).Call(ctx, in) 320 } 321 info := &grpc.UnaryServerInfo{ 322 Server: srv, 323 FullMethod: "/cloud.TestKubeCloudAPI/Call", 324 } 325 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 326 return srv.(TestKubeCloudAPIServer).Call(ctx, req.(*CommandRequest)) 327 } 328 return interceptor(ctx, in, info, handler) 329 } 330 331 func _TestKubeCloudAPI_ExecuteAsync_Handler(srv interface{}, stream grpc.ServerStream) error { 332 return srv.(TestKubeCloudAPIServer).ExecuteAsync(&testKubeCloudAPIExecuteAsyncServer{stream}) 333 } 334 335 type TestKubeCloudAPI_ExecuteAsyncServer interface { 336 Send(*ExecuteRequest) error 337 Recv() (*ExecuteResponse, error) 338 grpc.ServerStream 339 } 340 341 type testKubeCloudAPIExecuteAsyncServer struct { 342 grpc.ServerStream 343 } 344 345 func (x *testKubeCloudAPIExecuteAsyncServer) Send(m *ExecuteRequest) error { 346 return x.ServerStream.SendMsg(m) 347 } 348 349 func (x *testKubeCloudAPIExecuteAsyncServer) Recv() (*ExecuteResponse, error) { 350 m := new(ExecuteResponse) 351 if err := x.ServerStream.RecvMsg(m); err != nil { 352 return nil, err 353 } 354 return m, nil 355 } 356 357 func _TestKubeCloudAPI_GetLogsStream_Handler(srv interface{}, stream grpc.ServerStream) error { 358 return srv.(TestKubeCloudAPIServer).GetLogsStream(&testKubeCloudAPIGetLogsStreamServer{stream}) 359 } 360 361 type TestKubeCloudAPI_GetLogsStreamServer interface { 362 Send(*LogsStreamRequest) error 363 Recv() (*LogsStreamResponse, error) 364 grpc.ServerStream 365 } 366 367 type testKubeCloudAPIGetLogsStreamServer struct { 368 grpc.ServerStream 369 } 370 371 func (x *testKubeCloudAPIGetLogsStreamServer) Send(m *LogsStreamRequest) error { 372 return x.ServerStream.SendMsg(m) 373 } 374 375 func (x *testKubeCloudAPIGetLogsStreamServer) Recv() (*LogsStreamResponse, error) { 376 m := new(LogsStreamResponse) 377 if err := x.ServerStream.RecvMsg(m); err != nil { 378 return nil, err 379 } 380 return m, nil 381 } 382 383 func _TestKubeCloudAPI_GetTestWorkflowNotificationsStream_Handler(srv interface{}, stream grpc.ServerStream) error { 384 return srv.(TestKubeCloudAPIServer).GetTestWorkflowNotificationsStream(&testKubeCloudAPIGetTestWorkflowNotificationsStreamServer{stream}) 385 } 386 387 type TestKubeCloudAPI_GetTestWorkflowNotificationsStreamServer interface { 388 Send(*TestWorkflowNotificationsRequest) error 389 Recv() (*TestWorkflowNotificationsResponse, error) 390 grpc.ServerStream 391 } 392 393 type testKubeCloudAPIGetTestWorkflowNotificationsStreamServer struct { 394 grpc.ServerStream 395 } 396 397 func (x *testKubeCloudAPIGetTestWorkflowNotificationsStreamServer) Send(m *TestWorkflowNotificationsRequest) error { 398 return x.ServerStream.SendMsg(m) 399 } 400 401 func (x *testKubeCloudAPIGetTestWorkflowNotificationsStreamServer) Recv() (*TestWorkflowNotificationsResponse, error) { 402 m := new(TestWorkflowNotificationsResponse) 403 if err := x.ServerStream.RecvMsg(m); err != nil { 404 return nil, err 405 } 406 return m, nil 407 } 408 409 // TestKubeCloudAPI_ServiceDesc is the grpc.ServiceDesc for TestKubeCloudAPI service. 410 // It's only intended for direct use with grpc.RegisterService, 411 // and not to be introspected or modified (even as a copy) 412 var TestKubeCloudAPI_ServiceDesc = grpc.ServiceDesc{ 413 ServiceName: "cloud.TestKubeCloudAPI", 414 HandlerType: (*TestKubeCloudAPIServer)(nil), 415 Methods: []grpc.MethodDesc{ 416 { 417 MethodName: "Call", 418 Handler: _TestKubeCloudAPI_Call_Handler, 419 }, 420 }, 421 Streams: []grpc.StreamDesc{ 422 { 423 StreamName: "Execute", 424 Handler: _TestKubeCloudAPI_Execute_Handler, 425 ServerStreams: true, 426 ClientStreams: true, 427 }, 428 { 429 StreamName: "Send", 430 Handler: _TestKubeCloudAPI_Send_Handler, 431 ClientStreams: true, 432 }, 433 { 434 StreamName: "ExecuteAsync", 435 Handler: _TestKubeCloudAPI_ExecuteAsync_Handler, 436 ServerStreams: true, 437 ClientStreams: true, 438 }, 439 { 440 StreamName: "GetLogsStream", 441 Handler: _TestKubeCloudAPI_GetLogsStream_Handler, 442 ServerStreams: true, 443 ClientStreams: true, 444 }, 445 { 446 StreamName: "GetTestWorkflowNotificationsStream", 447 Handler: _TestKubeCloudAPI_GetTestWorkflowNotificationsStream_Handler, 448 ServerStreams: true, 449 ClientStreams: true, 450 }, 451 }, 452 Metadata: "proto/service.proto", 453 }