diff --git a/pb/plugin/v3/plugin.pb.go b/pb/plugin/v3/plugin.pb.go index d888c6fe..b529165e 100644 --- a/pb/plugin/v3/plugin.pb.go +++ b/pb/plugin/v3/plugin.pb.go @@ -2667,7 +2667,7 @@ var file_plugin_pb_plugin_v3_plugin_proto_rawDesc = []byte{ 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x2f, 0x0a, 0x13, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, - 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0xfb, 0x08, 0x0a, 0x06, + 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0xf7, 0x08, 0x0a, 0x06, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x58, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x25, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, @@ -2720,32 +2720,32 @@ var file_plugin_pb_plugin_v3_plugin_proto_rawDesc = []byte{ 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, 0x01, - 0x12, 0x74, 0x0a, 0x0f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x53, 0x63, 0x68, + 0x12, 0x70, 0x0a, 0x0f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x2d, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x28, 0x01, 0x30, 0x01, 0x12, 0x52, 0x0a, 0x05, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x12, - 0x23, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x6c, 0x75, - 0x67, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x71, 0x75, 0x65, 0x72, - 0x79, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x6f, 0x73, - 0x65, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6d, 0x0a, 0x0e, 0x54, 0x65, - 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2c, 0x2e, 0x63, - 0x6c, 0x6f, 0x75, 0x64, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, - 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x63, 0x6c, 0x6f, - 0x75, 0x64, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x76, - 0x33, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x53, 0x0a, 0x17, 0x69, 0x6f, 0x2e, - 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, - 0x6e, 0x2e, 0x76, 0x33, 0x50, 0x01, 0x5a, 0x36, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x70, 0x6c, - 0x75, 0x67, 0x69, 0x6e, 0x2d, 0x70, 0x62, 0x2d, 0x67, 0x6f, 0x2f, 0x70, 0x62, 0x2f, 0x70, 0x6c, - 0x75, 0x67, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x3b, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x65, 0x12, 0x52, 0x0a, 0x05, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x12, 0x23, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, + 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x24, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x6c, + 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x2e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6d, 0x0a, 0x0e, 0x54, 0x65, 0x73, 0x74, 0x43, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2c, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, + 0x54, 0x65, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x71, 0x75, + 0x65, 0x72, 0x79, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x65, + 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x53, 0x0a, 0x17, 0x69, 0x6f, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x76, 0x33, + 0x50, 0x01, 0x5a, 0x36, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, + 0x2d, 0x70, 0x62, 0x2d, 0x67, 0x6f, 0x2f, 0x70, 0x62, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, + 0x2f, 0x76, 0x33, 0x3b, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( diff --git a/pb/plugin/v3/plugin_grpc.pb.go b/pb/plugin/v3/plugin_grpc.pb.go index b4e7e9d2..cac51989 100644 --- a/pb/plugin/v3/plugin_grpc.pb.go +++ b/pb/plugin/v3/plugin_grpc.pb.go @@ -59,7 +59,7 @@ type PluginClient interface { // Transform resources. Transform(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[Transform_Request, Transform_Response], error) // Transform schemas. - TransformSchema(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[TransformSchema_Request, TransformSchema_Response], error) + TransformSchema(ctx context.Context, in *TransformSchema_Request, opts ...grpc.CallOption) (*TransformSchema_Response, error) // Send signal to flush and close open connections Close(ctx context.Context, in *Close_Request, opts ...grpc.CallOption) (*Close_Response, error) // Validate and test the connections used by the plugin @@ -188,19 +188,16 @@ func (c *pluginClient) Transform(ctx context.Context, opts ...grpc.CallOption) ( // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. type Plugin_TransformClient = grpc.BidiStreamingClient[Transform_Request, Transform_Response] -func (c *pluginClient) TransformSchema(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[TransformSchema_Request, TransformSchema_Response], error) { +func (c *pluginClient) TransformSchema(ctx context.Context, in *TransformSchema_Request, opts ...grpc.CallOption) (*TransformSchema_Response, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - stream, err := c.cc.NewStream(ctx, &Plugin_ServiceDesc.Streams[4], Plugin_TransformSchema_FullMethodName, cOpts...) + out := new(TransformSchema_Response) + err := c.cc.Invoke(ctx, Plugin_TransformSchema_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } - x := &grpc.GenericClientStream[TransformSchema_Request, TransformSchema_Response]{ClientStream: stream} - return x, nil + return out, nil } -// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. -type Plugin_TransformSchemaClient = grpc.BidiStreamingClient[TransformSchema_Request, TransformSchema_Response] - func (c *pluginClient) Close(ctx context.Context, in *Close_Request, opts ...grpc.CallOption) (*Close_Response, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(Close_Response) @@ -247,7 +244,7 @@ type PluginServer interface { // Transform resources. Transform(grpc.BidiStreamingServer[Transform_Request, Transform_Response]) error // Transform schemas. - TransformSchema(grpc.BidiStreamingServer[TransformSchema_Request, TransformSchema_Response]) error + TransformSchema(context.Context, *TransformSchema_Request) (*TransformSchema_Response, error) // Send signal to flush and close open connections Close(context.Context, *Close_Request) (*Close_Response, error) // Validate and test the connections used by the plugin @@ -289,8 +286,8 @@ func (UnimplementedPluginServer) Write(grpc.ClientStreamingServer[Write_Request, func (UnimplementedPluginServer) Transform(grpc.BidiStreamingServer[Transform_Request, Transform_Response]) error { return status.Errorf(codes.Unimplemented, "method Transform not implemented") } -func (UnimplementedPluginServer) TransformSchema(grpc.BidiStreamingServer[TransformSchema_Request, TransformSchema_Response]) error { - return status.Errorf(codes.Unimplemented, "method TransformSchema not implemented") +func (UnimplementedPluginServer) TransformSchema(context.Context, *TransformSchema_Request) (*TransformSchema_Response, error) { + return nil, status.Errorf(codes.Unimplemented, "method TransformSchema not implemented") } func (UnimplementedPluginServer) Close(context.Context, *Close_Request) (*Close_Response, error) { return nil, status.Errorf(codes.Unimplemented, "method Close not implemented") @@ -445,13 +442,24 @@ func _Plugin_Transform_Handler(srv interface{}, stream grpc.ServerStream) error // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. type Plugin_TransformServer = grpc.BidiStreamingServer[Transform_Request, Transform_Response] -func _Plugin_TransformSchema_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(PluginServer).TransformSchema(&grpc.GenericServerStream[TransformSchema_Request, TransformSchema_Response]{ServerStream: stream}) +func _Plugin_TransformSchema_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(TransformSchema_Request) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PluginServer).TransformSchema(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Plugin_TransformSchema_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PluginServer).TransformSchema(ctx, req.(*TransformSchema_Request)) + } + return interceptor(ctx, in, info, handler) } -// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. -type Plugin_TransformSchemaServer = grpc.BidiStreamingServer[TransformSchema_Request, TransformSchema_Response] - func _Plugin_Close_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(Close_Request) if err := dec(in); err != nil { @@ -515,6 +523,10 @@ var Plugin_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetTables", Handler: _Plugin_GetTables_Handler, }, + { + MethodName: "TransformSchema", + Handler: _Plugin_TransformSchema_Handler, + }, { MethodName: "Close", Handler: _Plugin_Close_Handler, @@ -546,12 +558,6 @@ var Plugin_ServiceDesc = grpc.ServiceDesc{ ServerStreams: true, ClientStreams: true, }, - { - StreamName: "TransformSchema", - Handler: _Plugin_TransformSchema_Handler, - ServerStreams: true, - ClientStreams: true, - }, }, Metadata: "plugin-pb/plugin/v3/plugin.proto", }