1// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
2
3package google_security_meshca_v1
4
5import (
6	context "context"
7	grpc "google.golang.org/grpc"
8	codes "google.golang.org/grpc/codes"
9	status "google.golang.org/grpc/status"
10)
11
12// This is a compile-time assertion to ensure that this generated file
13// is compatible with the grpc package it is being compiled against.
14// Requires gRPC-Go v1.32.0 or later.
15const _ = grpc.SupportPackageIsVersion7
16
17// MeshCertificateServiceClient is the client API for MeshCertificateService service.
18//
19// 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.
20type MeshCertificateServiceClient interface {
21	// Using provided CSR, returns a signed certificate that represents a GCP
22	// service account identity.
23	CreateCertificate(ctx context.Context, in *MeshCertificateRequest, opts ...grpc.CallOption) (*MeshCertificateResponse, error)
24}
25
26type meshCertificateServiceClient struct {
27	cc grpc.ClientConnInterface
28}
29
30func NewMeshCertificateServiceClient(cc grpc.ClientConnInterface) MeshCertificateServiceClient {
31	return &meshCertificateServiceClient{cc}
32}
33
34func (c *meshCertificateServiceClient) CreateCertificate(ctx context.Context, in *MeshCertificateRequest, opts ...grpc.CallOption) (*MeshCertificateResponse, error) {
35	out := new(MeshCertificateResponse)
36	err := c.cc.Invoke(ctx, "/google.security.meshca.v1.MeshCertificateService/CreateCertificate", in, out, opts...)
37	if err != nil {
38		return nil, err
39	}
40	return out, nil
41}
42
43// MeshCertificateServiceServer is the server API for MeshCertificateService service.
44// All implementations must embed UnimplementedMeshCertificateServiceServer
45// for forward compatibility
46type MeshCertificateServiceServer interface {
47	// Using provided CSR, returns a signed certificate that represents a GCP
48	// service account identity.
49	CreateCertificate(context.Context, *MeshCertificateRequest) (*MeshCertificateResponse, error)
50	mustEmbedUnimplementedMeshCertificateServiceServer()
51}
52
53// UnimplementedMeshCertificateServiceServer must be embedded to have forward compatible implementations.
54type UnimplementedMeshCertificateServiceServer struct {
55}
56
57func (UnimplementedMeshCertificateServiceServer) CreateCertificate(context.Context, *MeshCertificateRequest) (*MeshCertificateResponse, error) {
58	return nil, status.Errorf(codes.Unimplemented, "method CreateCertificate not implemented")
59}
60func (UnimplementedMeshCertificateServiceServer) mustEmbedUnimplementedMeshCertificateServiceServer() {
61}
62
63// UnsafeMeshCertificateServiceServer may be embedded to opt out of forward compatibility for this service.
64// Use of this interface is not recommended, as added methods to MeshCertificateServiceServer will
65// result in compilation errors.
66type UnsafeMeshCertificateServiceServer interface {
67	mustEmbedUnimplementedMeshCertificateServiceServer()
68}
69
70func RegisterMeshCertificateServiceServer(s grpc.ServiceRegistrar, srv MeshCertificateServiceServer) {
71	s.RegisterService(&MeshCertificateService_ServiceDesc, srv)
72}
73
74func _MeshCertificateService_CreateCertificate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
75	in := new(MeshCertificateRequest)
76	if err := dec(in); err != nil {
77		return nil, err
78	}
79	if interceptor == nil {
80		return srv.(MeshCertificateServiceServer).CreateCertificate(ctx, in)
81	}
82	info := &grpc.UnaryServerInfo{
83		Server:     srv,
84		FullMethod: "/google.security.meshca.v1.MeshCertificateService/CreateCertificate",
85	}
86	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
87		return srv.(MeshCertificateServiceServer).CreateCertificate(ctx, req.(*MeshCertificateRequest))
88	}
89	return interceptor(ctx, in, info, handler)
90}
91
92// MeshCertificateService_ServiceDesc is the grpc.ServiceDesc for MeshCertificateService service.
93// It's only intended for direct use with grpc.RegisterService,
94// and not to be introspected or modified (even as a copy)
95var MeshCertificateService_ServiceDesc = grpc.ServiceDesc{
96	ServiceName: "google.security.meshca.v1.MeshCertificateService",
97	HandlerType: (*MeshCertificateServiceServer)(nil),
98	Methods: []grpc.MethodDesc{
99		{
100			MethodName: "CreateCertificate",
101			Handler:    _MeshCertificateService_CreateCertificate_Handler,
102		},
103	},
104	Streams:  []grpc.StreamDesc{},
105	Metadata: "istio/google/security/meshca/v1/meshca.proto",
106}
107