blob: dba7ea9eb08d82a67b42092519228c6b7a94ce85 [file] [log] [blame]
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
package admin
import (
context "context"
empty "github.com/golang/protobuf/ptypes/empty"
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
// CertificateAuthoritiesClient is the client API for CertificateAuthorities 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 CertificateAuthoritiesClient interface {
// FetchCRL makes the server fetch a CRL for some CA.
FetchCRL(ctx context.Context, in *FetchCRLRequest, opts ...grpc.CallOption) (*FetchCRLResponse, error)
// ListCAs returns a list of Common Names of registered CAs.
ListCAs(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*ListCAsResponse, error)
// GetCAStatus returns configuration of some CA defined in the config.
GetCAStatus(ctx context.Context, in *GetCAStatusRequest, opts ...grpc.CallOption) (*GetCAStatusResponse, error)
// IsRevokedCert says whether a certificate serial number is in the CRL.
IsRevokedCert(ctx context.Context, in *IsRevokedCertRequest, opts ...grpc.CallOption) (*IsRevokedCertResponse, error)
// CheckCertificate says whether a certificate is valid or not.
CheckCertificate(ctx context.Context, in *CheckCertificateRequest, opts ...grpc.CallOption) (*CheckCertificateResponse, error)
}
type certificateAuthoritiesClient struct {
cc grpc.ClientConnInterface
}
func NewCertificateAuthoritiesClient(cc grpc.ClientConnInterface) CertificateAuthoritiesClient {
return &certificateAuthoritiesClient{cc}
}
func (c *certificateAuthoritiesClient) FetchCRL(ctx context.Context, in *FetchCRLRequest, opts ...grpc.CallOption) (*FetchCRLResponse, error) {
out := new(FetchCRLResponse)
err := c.cc.Invoke(ctx, "/tokenserver.admin.CertificateAuthorities/FetchCRL", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *certificateAuthoritiesClient) ListCAs(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*ListCAsResponse, error) {
out := new(ListCAsResponse)
err := c.cc.Invoke(ctx, "/tokenserver.admin.CertificateAuthorities/ListCAs", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *certificateAuthoritiesClient) GetCAStatus(ctx context.Context, in *GetCAStatusRequest, opts ...grpc.CallOption) (*GetCAStatusResponse, error) {
out := new(GetCAStatusResponse)
err := c.cc.Invoke(ctx, "/tokenserver.admin.CertificateAuthorities/GetCAStatus", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *certificateAuthoritiesClient) IsRevokedCert(ctx context.Context, in *IsRevokedCertRequest, opts ...grpc.CallOption) (*IsRevokedCertResponse, error) {
out := new(IsRevokedCertResponse)
err := c.cc.Invoke(ctx, "/tokenserver.admin.CertificateAuthorities/IsRevokedCert", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *certificateAuthoritiesClient) CheckCertificate(ctx context.Context, in *CheckCertificateRequest, opts ...grpc.CallOption) (*CheckCertificateResponse, error) {
out := new(CheckCertificateResponse)
err := c.cc.Invoke(ctx, "/tokenserver.admin.CertificateAuthorities/CheckCertificate", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// CertificateAuthoritiesServer is the server API for CertificateAuthorities service.
// All implementations must embed UnimplementedCertificateAuthoritiesServer
// for forward compatibility
type CertificateAuthoritiesServer interface {
// FetchCRL makes the server fetch a CRL for some CA.
FetchCRL(context.Context, *FetchCRLRequest) (*FetchCRLResponse, error)
// ListCAs returns a list of Common Names of registered CAs.
ListCAs(context.Context, *empty.Empty) (*ListCAsResponse, error)
// GetCAStatus returns configuration of some CA defined in the config.
GetCAStatus(context.Context, *GetCAStatusRequest) (*GetCAStatusResponse, error)
// IsRevokedCert says whether a certificate serial number is in the CRL.
IsRevokedCert(context.Context, *IsRevokedCertRequest) (*IsRevokedCertResponse, error)
// CheckCertificate says whether a certificate is valid or not.
CheckCertificate(context.Context, *CheckCertificateRequest) (*CheckCertificateResponse, error)
mustEmbedUnimplementedCertificateAuthoritiesServer()
}
// UnimplementedCertificateAuthoritiesServer must be embedded to have forward compatible implementations.
type UnimplementedCertificateAuthoritiesServer struct {
}
func (UnimplementedCertificateAuthoritiesServer) FetchCRL(context.Context, *FetchCRLRequest) (*FetchCRLResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method FetchCRL not implemented")
}
func (UnimplementedCertificateAuthoritiesServer) ListCAs(context.Context, *empty.Empty) (*ListCAsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListCAs not implemented")
}
func (UnimplementedCertificateAuthoritiesServer) GetCAStatus(context.Context, *GetCAStatusRequest) (*GetCAStatusResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetCAStatus not implemented")
}
func (UnimplementedCertificateAuthoritiesServer) IsRevokedCert(context.Context, *IsRevokedCertRequest) (*IsRevokedCertResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method IsRevokedCert not implemented")
}
func (UnimplementedCertificateAuthoritiesServer) CheckCertificate(context.Context, *CheckCertificateRequest) (*CheckCertificateResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CheckCertificate not implemented")
}
func (UnimplementedCertificateAuthoritiesServer) mustEmbedUnimplementedCertificateAuthoritiesServer() {
}
// UnsafeCertificateAuthoritiesServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to CertificateAuthoritiesServer will
// result in compilation errors.
type UnsafeCertificateAuthoritiesServer interface {
mustEmbedUnimplementedCertificateAuthoritiesServer()
}
func RegisterCertificateAuthoritiesServer(s grpc.ServiceRegistrar, srv CertificateAuthoritiesServer) {
s.RegisterService(&CertificateAuthorities_ServiceDesc, srv)
}
func _CertificateAuthorities_FetchCRL_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(FetchCRLRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CertificateAuthoritiesServer).FetchCRL(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/tokenserver.admin.CertificateAuthorities/FetchCRL",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CertificateAuthoritiesServer).FetchCRL(ctx, req.(*FetchCRLRequest))
}
return interceptor(ctx, in, info, handler)
}
func _CertificateAuthorities_ListCAs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(empty.Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CertificateAuthoritiesServer).ListCAs(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/tokenserver.admin.CertificateAuthorities/ListCAs",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CertificateAuthoritiesServer).ListCAs(ctx, req.(*empty.Empty))
}
return interceptor(ctx, in, info, handler)
}
func _CertificateAuthorities_GetCAStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetCAStatusRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CertificateAuthoritiesServer).GetCAStatus(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/tokenserver.admin.CertificateAuthorities/GetCAStatus",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CertificateAuthoritiesServer).GetCAStatus(ctx, req.(*GetCAStatusRequest))
}
return interceptor(ctx, in, info, handler)
}
func _CertificateAuthorities_IsRevokedCert_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(IsRevokedCertRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CertificateAuthoritiesServer).IsRevokedCert(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/tokenserver.admin.CertificateAuthorities/IsRevokedCert",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CertificateAuthoritiesServer).IsRevokedCert(ctx, req.(*IsRevokedCertRequest))
}
return interceptor(ctx, in, info, handler)
}
func _CertificateAuthorities_CheckCertificate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CheckCertificateRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CertificateAuthoritiesServer).CheckCertificate(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/tokenserver.admin.CertificateAuthorities/CheckCertificate",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CertificateAuthoritiesServer).CheckCertificate(ctx, req.(*CheckCertificateRequest))
}
return interceptor(ctx, in, info, handler)
}
// CertificateAuthorities_ServiceDesc is the grpc.ServiceDesc for CertificateAuthorities service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var CertificateAuthorities_ServiceDesc = grpc.ServiceDesc{
ServiceName: "tokenserver.admin.CertificateAuthorities",
HandlerType: (*CertificateAuthoritiesServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "FetchCRL",
Handler: _CertificateAuthorities_FetchCRL_Handler,
},
{
MethodName: "ListCAs",
Handler: _CertificateAuthorities_ListCAs_Handler,
},
{
MethodName: "GetCAStatus",
Handler: _CertificateAuthorities_GetCAStatus_Handler,
},
{
MethodName: "IsRevokedCert",
Handler: _CertificateAuthorities_IsRevokedCert_Handler,
},
{
MethodName: "CheckCertificate",
Handler: _CertificateAuthorities_CheckCertificate_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "go.chromium.org/luci/tokenserver/api/admin/v1/certificate_authorities.proto",
}