138 lines
4.5 KiB
Go
138 lines
4.5 KiB
Go
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
|
|
package initv1
|
|
|
|
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
|
|
|
|
// InitClient is the client API for Init 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 InitClient interface {
|
|
Init(ctx context.Context, in *InitRequest, opts ...grpc.CallOption) (*InitResponse, error)
|
|
Deinit(ctx context.Context, in *DeinitRequest, opts ...grpc.CallOption) (*DeinitResponse, error)
|
|
}
|
|
|
|
type initClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewInitClient(cc grpc.ClientConnInterface) InitClient {
|
|
return &initClient{cc}
|
|
}
|
|
|
|
func (c *initClient) Init(ctx context.Context, in *InitRequest, opts ...grpc.CallOption) (*InitResponse, error) {
|
|
out := new(InitResponse)
|
|
err := c.cc.Invoke(ctx, "/spire.service.private.init.v1.Init/Init", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *initClient) Deinit(ctx context.Context, in *DeinitRequest, opts ...grpc.CallOption) (*DeinitResponse, error) {
|
|
out := new(DeinitResponse)
|
|
err := c.cc.Invoke(ctx, "/spire.service.private.init.v1.Init/Deinit", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// InitServer is the server API for Init service.
|
|
// All implementations must embed UnimplementedInitServer
|
|
// for forward compatibility
|
|
type InitServer interface {
|
|
Init(context.Context, *InitRequest) (*InitResponse, error)
|
|
Deinit(context.Context, *DeinitRequest) (*DeinitResponse, error)
|
|
mustEmbedUnimplementedInitServer()
|
|
}
|
|
|
|
// UnimplementedInitServer must be embedded to have forward compatible implementations.
|
|
type UnimplementedInitServer struct {
|
|
}
|
|
|
|
func (UnimplementedInitServer) Init(context.Context, *InitRequest) (*InitResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Init not implemented")
|
|
}
|
|
func (UnimplementedInitServer) Deinit(context.Context, *DeinitRequest) (*DeinitResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Deinit not implemented")
|
|
}
|
|
func (UnimplementedInitServer) mustEmbedUnimplementedInitServer() {}
|
|
|
|
// UnsafeInitServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to InitServer will
|
|
// result in compilation errors.
|
|
type UnsafeInitServer interface {
|
|
mustEmbedUnimplementedInitServer()
|
|
}
|
|
|
|
func RegisterInitServer(s grpc.ServiceRegistrar, srv InitServer) {
|
|
s.RegisterService(&Init_ServiceDesc, srv)
|
|
}
|
|
|
|
func _Init_Init_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(InitRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(InitServer).Init(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/spire.service.private.init.v1.Init/Init",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(InitServer).Init(ctx, req.(*InitRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Init_Deinit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(DeinitRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(InitServer).Deinit(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/spire.service.private.init.v1.Init/Deinit",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(InitServer).Deinit(ctx, req.(*DeinitRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// Init_ServiceDesc is the grpc.ServiceDesc for Init service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var Init_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "spire.service.private.init.v1.Init",
|
|
HandlerType: (*InitServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "Init",
|
|
Handler: _Init_Init_Handler,
|
|
},
|
|
{
|
|
MethodName: "Deinit",
|
|
Handler: _Init_Deinit_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "spire/service/private/init/v1/init.proto",
|
|
}
|