blob: 381bf06fc099d1eb1499676b2d7358cecb096b21 [file] [log] [blame]
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.1.0
// - protoc v3.17.1
// source: chromite/api/signing.proto
package api
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
// SigningServiceClient is the client API for SigningService 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 SigningServiceClient interface {
// Create a PreMP keyset for the given board.
// Example json:
// {
// "board": "foo",
// "uefi": true,
// }
CreatePreMPKeys(ctx context.Context, in *CreatePreMPKeysRequest, opts ...grpc.CallOption) (*CreatePreMPKeysResponse, error)
}
type signingServiceClient struct {
cc grpc.ClientConnInterface
}
func NewSigningServiceClient(cc grpc.ClientConnInterface) SigningServiceClient {
return &signingServiceClient{cc}
}
func (c *signingServiceClient) CreatePreMPKeys(ctx context.Context, in *CreatePreMPKeysRequest, opts ...grpc.CallOption) (*CreatePreMPKeysResponse, error) {
out := new(CreatePreMPKeysResponse)
err := c.cc.Invoke(ctx, "/chromite.api.SigningService/CreatePreMPKeys", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// SigningServiceServer is the server API for SigningService service.
// All implementations must embed UnimplementedSigningServiceServer
// for forward compatibility
type SigningServiceServer interface {
// Create a PreMP keyset for the given board.
// Example json:
// {
// "board": "foo",
// "uefi": true,
// }
CreatePreMPKeys(context.Context, *CreatePreMPKeysRequest) (*CreatePreMPKeysResponse, error)
mustEmbedUnimplementedSigningServiceServer()
}
// UnimplementedSigningServiceServer must be embedded to have forward compatible implementations.
type UnimplementedSigningServiceServer struct {
}
func (UnimplementedSigningServiceServer) CreatePreMPKeys(context.Context, *CreatePreMPKeysRequest) (*CreatePreMPKeysResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreatePreMPKeys not implemented")
}
func (UnimplementedSigningServiceServer) mustEmbedUnimplementedSigningServiceServer() {}
// UnsafeSigningServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to SigningServiceServer will
// result in compilation errors.
type UnsafeSigningServiceServer interface {
mustEmbedUnimplementedSigningServiceServer()
}
func RegisterSigningServiceServer(s grpc.ServiceRegistrar, srv SigningServiceServer) {
s.RegisterService(&SigningService_ServiceDesc, srv)
}
func _SigningService_CreatePreMPKeys_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreatePreMPKeysRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SigningServiceServer).CreatePreMPKeys(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/chromite.api.SigningService/CreatePreMPKeys",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SigningServiceServer).CreatePreMPKeys(ctx, req.(*CreatePreMPKeysRequest))
}
return interceptor(ctx, in, info, handler)
}
// SigningService_ServiceDesc is the grpc.ServiceDesc for SigningService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var SigningService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "chromite.api.SigningService",
HandlerType: (*SigningServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "CreatePreMPKeys",
Handler: _SigningService_CreatePreMPKeys_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "chromite/api/signing.proto",
}