mirror of https://github.com/dragonflyoss/api.git
106 lines
3.7 KiB
Go
106 lines
3.7 KiB
Go
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
// versions:
|
|
// - protoc-gen-go-grpc v1.2.0
|
|
// - protoc v3.21.6
|
|
// source: pkg/apis/security/v1/security.proto
|
|
|
|
package security
|
|
|
|
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.32.0 or later.
|
|
const _ = grpc.SupportPackageIsVersion7
|
|
|
|
// CertificateClient is the client API for Certificate 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 CertificateClient interface {
|
|
// Using provided CSR, returns a signed certificate.
|
|
IssueCertificate(ctx context.Context, in *CertificateRequest, opts ...grpc.CallOption) (*CertificateResponse, error)
|
|
}
|
|
|
|
type certificateClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewCertificateClient(cc grpc.ClientConnInterface) CertificateClient {
|
|
return &certificateClient{cc}
|
|
}
|
|
|
|
func (c *certificateClient) IssueCertificate(ctx context.Context, in *CertificateRequest, opts ...grpc.CallOption) (*CertificateResponse, error) {
|
|
out := new(CertificateResponse)
|
|
err := c.cc.Invoke(ctx, "/security.Certificate/IssueCertificate", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// CertificateServer is the server API for Certificate service.
|
|
// All implementations should embed UnimplementedCertificateServer
|
|
// for forward compatibility
|
|
type CertificateServer interface {
|
|
// Using provided CSR, returns a signed certificate.
|
|
IssueCertificate(context.Context, *CertificateRequest) (*CertificateResponse, error)
|
|
}
|
|
|
|
// UnimplementedCertificateServer should be embedded to have forward compatible implementations.
|
|
type UnimplementedCertificateServer struct {
|
|
}
|
|
|
|
func (UnimplementedCertificateServer) IssueCertificate(context.Context, *CertificateRequest) (*CertificateResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method IssueCertificate not implemented")
|
|
}
|
|
|
|
// UnsafeCertificateServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to CertificateServer will
|
|
// result in compilation errors.
|
|
type UnsafeCertificateServer interface {
|
|
mustEmbedUnimplementedCertificateServer()
|
|
}
|
|
|
|
func RegisterCertificateServer(s grpc.ServiceRegistrar, srv CertificateServer) {
|
|
s.RegisterService(&Certificate_ServiceDesc, srv)
|
|
}
|
|
|
|
func _Certificate_IssueCertificate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(CertificateRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(CertificateServer).IssueCertificate(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/security.Certificate/IssueCertificate",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(CertificateServer).IssueCertificate(ctx, req.(*CertificateRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// Certificate_ServiceDesc is the grpc.ServiceDesc for Certificate service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var Certificate_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "security.Certificate",
|
|
HandlerType: (*CertificateServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "IssueCertificate",
|
|
Handler: _Certificate_IssueCertificate_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "pkg/apis/security/v1/security.proto",
|
|
}
|