Files
certimate/pkg/plugin/proto/plugin_grpc.pb.go
2026-07-28 13:21:39 +08:00

202 lines
8.2 KiB
Go

// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.2
// - protoc v5.29.3
// source: pkg/plugin/proto/plugin.proto
package proto
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion9
const (
DeployerPlugin_GetMetadata_FullMethodName = "/certimate.plugin.v1.DeployerPlugin/GetMetadata"
DeployerPlugin_GetConfigSchema_FullMethodName = "/certimate.plugin.v1.DeployerPlugin/GetConfigSchema"
DeployerPlugin_Deploy_FullMethodName = "/certimate.plugin.v1.DeployerPlugin/Deploy"
)
// DeployerPluginClient is the client API for DeployerPlugin service.
//
// 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.
type DeployerPluginClient interface {
GetMetadata(ctx context.Context, in *GetMetadataRequest, opts ...grpc.CallOption) (*GetMetadataResponse, error)
GetConfigSchema(ctx context.Context, in *GetConfigSchemaRequest, opts ...grpc.CallOption) (*GetConfigSchemaResponse, error)
Deploy(ctx context.Context, in *DeployRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[DeployFrame], error)
}
type deployerPluginClient struct {
cc grpc.ClientConnInterface
}
func NewDeployerPluginClient(cc grpc.ClientConnInterface) DeployerPluginClient {
return &deployerPluginClient{cc}
}
func (c *deployerPluginClient) GetMetadata(ctx context.Context, in *GetMetadataRequest, opts ...grpc.CallOption) (*GetMetadataResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetMetadataResponse)
err := c.cc.Invoke(ctx, DeployerPlugin_GetMetadata_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *deployerPluginClient) GetConfigSchema(ctx context.Context, in *GetConfigSchemaRequest, opts ...grpc.CallOption) (*GetConfigSchemaResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetConfigSchemaResponse)
err := c.cc.Invoke(ctx, DeployerPlugin_GetConfigSchema_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *deployerPluginClient) Deploy(ctx context.Context, in *DeployRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[DeployFrame], error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
stream, err := c.cc.NewStream(ctx, &DeployerPlugin_ServiceDesc.Streams[0], DeployerPlugin_Deploy_FullMethodName, cOpts...)
if err != nil {
return nil, err
}
x := &grpc.GenericClientStream[DeployRequest, DeployFrame]{ClientStream: stream}
if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err
}
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
return x, nil
}
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type DeployerPlugin_DeployClient = grpc.ServerStreamingClient[DeployFrame]
// DeployerPluginServer is the server API for DeployerPlugin service.
// All implementations must embed UnimplementedDeployerPluginServer
// for forward compatibility.
type DeployerPluginServer interface {
GetMetadata(context.Context, *GetMetadataRequest) (*GetMetadataResponse, error)
GetConfigSchema(context.Context, *GetConfigSchemaRequest) (*GetConfigSchemaResponse, error)
Deploy(*DeployRequest, grpc.ServerStreamingServer[DeployFrame]) error
mustEmbedUnimplementedDeployerPluginServer()
}
// UnimplementedDeployerPluginServer must be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedDeployerPluginServer struct{}
func (UnimplementedDeployerPluginServer) GetMetadata(context.Context, *GetMetadataRequest) (*GetMetadataResponse, error) {
return nil, status.Error(codes.Unimplemented, "method GetMetadata not implemented")
}
func (UnimplementedDeployerPluginServer) GetConfigSchema(context.Context, *GetConfigSchemaRequest) (*GetConfigSchemaResponse, error) {
return nil, status.Error(codes.Unimplemented, "method GetConfigSchema not implemented")
}
func (UnimplementedDeployerPluginServer) Deploy(*DeployRequest, grpc.ServerStreamingServer[DeployFrame]) error {
return status.Error(codes.Unimplemented, "method Deploy not implemented")
}
func (UnimplementedDeployerPluginServer) mustEmbedUnimplementedDeployerPluginServer() {}
func (UnimplementedDeployerPluginServer) testEmbeddedByValue() {}
// UnsafeDeployerPluginServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to DeployerPluginServer will
// result in compilation errors.
type UnsafeDeployerPluginServer interface {
mustEmbedUnimplementedDeployerPluginServer()
}
func RegisterDeployerPluginServer(s grpc.ServiceRegistrar, srv DeployerPluginServer) {
// If the following call panics, it indicates UnimplementedDeployerPluginServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&DeployerPlugin_ServiceDesc, srv)
}
func _DeployerPlugin_GetMetadata_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetMetadataRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DeployerPluginServer).GetMetadata(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: DeployerPlugin_GetMetadata_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DeployerPluginServer).GetMetadata(ctx, req.(*GetMetadataRequest))
}
return interceptor(ctx, in, info, handler)
}
func _DeployerPlugin_GetConfigSchema_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetConfigSchemaRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DeployerPluginServer).GetConfigSchema(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: DeployerPlugin_GetConfigSchema_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DeployerPluginServer).GetConfigSchema(ctx, req.(*GetConfigSchemaRequest))
}
return interceptor(ctx, in, info, handler)
}
func _DeployerPlugin_Deploy_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(DeployRequest)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(DeployerPluginServer).Deploy(m, &grpc.GenericServerStream[DeployRequest, DeployFrame]{ServerStream: stream})
}
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type DeployerPlugin_DeployServer = grpc.ServerStreamingServer[DeployFrame]
// DeployerPlugin_ServiceDesc is the grpc.ServiceDesc for DeployerPlugin service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var DeployerPlugin_ServiceDesc = grpc.ServiceDesc{
ServiceName: "certimate.plugin.v1.DeployerPlugin",
HandlerType: (*DeployerPluginServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetMetadata",
Handler: _DeployerPlugin_GetMetadata_Handler,
},
{
MethodName: "GetConfigSchema",
Handler: _DeployerPlugin_GetConfigSchema_Handler,
},
},
Streams: []grpc.StreamDesc{
{
StreamName: "Deploy",
Handler: _DeployerPlugin_Deploy_Handler,
ServerStreams: true,
},
},
Metadata: "pkg/plugin/proto/plugin.proto",
}