build: bootstrap Go toolchain and generated APIs

This commit is contained in:
2026-08-31 08:01:13 +00:00
parent a110e1df57
commit e23737de0d
24 changed files with 7618 additions and 0 deletions
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+619
View File
@@ -0,0 +1,619 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.2
// - protoc (unknown)
// source: rvbox/v1/control.proto
package rvboxv1
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.64.0 or later.
const _ = grpc.SupportPackageIsVersion9
const (
Control_ListClients_FullMethodName = "/rvbox.v1.Control/ListClients"
Control_GetClient_FullMethodName = "/rvbox.v1.Control/GetClient"
Control_ListCommands_FullMethodName = "/rvbox.v1.Control/ListCommands"
Control_GetCommand_FullMethodName = "/rvbox.v1.Control/GetCommand"
Control_RunCommand_FullMethodName = "/rvbox.v1.Control/RunCommand"
Control_FollowCommand_FullMethodName = "/rvbox.v1.Control/FollowCommand"
Control_AppendStdin_FullMethodName = "/rvbox.v1.Control/AppendStdin"
Control_CloseStdin_FullMethodName = "/rvbox.v1.Control/CloseStdin"
Control_SignalCommand_FullMethodName = "/rvbox.v1.Control/SignalCommand"
Control_GetOutput_FullMethodName = "/rvbox.v1.Control/GetOutput"
Control_ListStorageIncidents_FullMethodName = "/rvbox.v1.Control/ListStorageIncidents"
Control_RepairStorageIncident_FullMethodName = "/rvbox.v1.Control/RepairStorageIncident"
Control_AcknowledgeStorageIncident_FullMethodName = "/rvbox.v1.Control/AcknowledgeStorageIncident"
Control_AuthorizeClientTakeover_FullMethodName = "/rvbox.v1.Control/AuthorizeClientTakeover"
)
// ControlClient is the client API for Control 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 ControlClient interface {
ListClients(ctx context.Context, in *ListClientsRequest, opts ...grpc.CallOption) (*ListClientsResponse, error)
GetClient(ctx context.Context, in *GetClientRequest, opts ...grpc.CallOption) (*GetClientResponse, error)
ListCommands(ctx context.Context, in *ListCommandsRequest, opts ...grpc.CallOption) (*ListCommandsResponse, error)
GetCommand(ctx context.Context, in *GetCommandRequest, opts ...grpc.CallOption) (*GetCommandResponse, error)
RunCommand(ctx context.Context, in *RunCommandRequest, opts ...grpc.CallOption) (*RunCommandResponse, error)
FollowCommand(ctx context.Context, in *FollowCommandRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[FollowCommandResponse], error)
AppendStdin(ctx context.Context, in *AppendStdinRequest, opts ...grpc.CallOption) (*AppendStdinResponse, error)
CloseStdin(ctx context.Context, in *CloseStdinRequest, opts ...grpc.CallOption) (*CloseStdinResponse, error)
SignalCommand(ctx context.Context, in *ControlSignalCommandRequest, opts ...grpc.CallOption) (*ControlSignalCommandResponse, error)
GetOutput(ctx context.Context, in *GetOutputRequest, opts ...grpc.CallOption) (*GetOutputResponse, error)
ListStorageIncidents(ctx context.Context, in *ListStorageIncidentsRequest, opts ...grpc.CallOption) (*ListStorageIncidentsResponse, error)
RepairStorageIncident(ctx context.Context, in *RepairStorageIncidentRequest, opts ...grpc.CallOption) (*RepairStorageIncidentResponse, error)
AcknowledgeStorageIncident(ctx context.Context, in *AcknowledgeStorageIncidentRequest, opts ...grpc.CallOption) (*AcknowledgeStorageIncidentResponse, error)
AuthorizeClientTakeover(ctx context.Context, in *AuthorizeClientTakeoverRequest, opts ...grpc.CallOption) (*AuthorizeClientTakeoverResponse, error)
}
type controlClient struct {
cc grpc.ClientConnInterface
}
func NewControlClient(cc grpc.ClientConnInterface) ControlClient {
return &controlClient{cc}
}
func (c *controlClient) ListClients(ctx context.Context, in *ListClientsRequest, opts ...grpc.CallOption) (*ListClientsResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ListClientsResponse)
err := c.cc.Invoke(ctx, Control_ListClients_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *controlClient) GetClient(ctx context.Context, in *GetClientRequest, opts ...grpc.CallOption) (*GetClientResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetClientResponse)
err := c.cc.Invoke(ctx, Control_GetClient_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *controlClient) ListCommands(ctx context.Context, in *ListCommandsRequest, opts ...grpc.CallOption) (*ListCommandsResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ListCommandsResponse)
err := c.cc.Invoke(ctx, Control_ListCommands_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *controlClient) GetCommand(ctx context.Context, in *GetCommandRequest, opts ...grpc.CallOption) (*GetCommandResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetCommandResponse)
err := c.cc.Invoke(ctx, Control_GetCommand_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *controlClient) RunCommand(ctx context.Context, in *RunCommandRequest, opts ...grpc.CallOption) (*RunCommandResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(RunCommandResponse)
err := c.cc.Invoke(ctx, Control_RunCommand_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *controlClient) FollowCommand(ctx context.Context, in *FollowCommandRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[FollowCommandResponse], error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
stream, err := c.cc.NewStream(ctx, &Control_ServiceDesc.Streams[0], Control_FollowCommand_FullMethodName, cOpts...)
if err != nil {
return nil, err
}
x := &grpc.GenericClientStream[FollowCommandRequest, FollowCommandResponse]{ClientStream: stream}
if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err
}
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
return x, nil
}
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type Control_FollowCommandClient = grpc.ServerStreamingClient[FollowCommandResponse]
func (c *controlClient) AppendStdin(ctx context.Context, in *AppendStdinRequest, opts ...grpc.CallOption) (*AppendStdinResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(AppendStdinResponse)
err := c.cc.Invoke(ctx, Control_AppendStdin_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *controlClient) CloseStdin(ctx context.Context, in *CloseStdinRequest, opts ...grpc.CallOption) (*CloseStdinResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(CloseStdinResponse)
err := c.cc.Invoke(ctx, Control_CloseStdin_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *controlClient) SignalCommand(ctx context.Context, in *ControlSignalCommandRequest, opts ...grpc.CallOption) (*ControlSignalCommandResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ControlSignalCommandResponse)
err := c.cc.Invoke(ctx, Control_SignalCommand_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *controlClient) GetOutput(ctx context.Context, in *GetOutputRequest, opts ...grpc.CallOption) (*GetOutputResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetOutputResponse)
err := c.cc.Invoke(ctx, Control_GetOutput_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *controlClient) ListStorageIncidents(ctx context.Context, in *ListStorageIncidentsRequest, opts ...grpc.CallOption) (*ListStorageIncidentsResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ListStorageIncidentsResponse)
err := c.cc.Invoke(ctx, Control_ListStorageIncidents_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *controlClient) RepairStorageIncident(ctx context.Context, in *RepairStorageIncidentRequest, opts ...grpc.CallOption) (*RepairStorageIncidentResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(RepairStorageIncidentResponse)
err := c.cc.Invoke(ctx, Control_RepairStorageIncident_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *controlClient) AcknowledgeStorageIncident(ctx context.Context, in *AcknowledgeStorageIncidentRequest, opts ...grpc.CallOption) (*AcknowledgeStorageIncidentResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(AcknowledgeStorageIncidentResponse)
err := c.cc.Invoke(ctx, Control_AcknowledgeStorageIncident_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *controlClient) AuthorizeClientTakeover(ctx context.Context, in *AuthorizeClientTakeoverRequest, opts ...grpc.CallOption) (*AuthorizeClientTakeoverResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(AuthorizeClientTakeoverResponse)
err := c.cc.Invoke(ctx, Control_AuthorizeClientTakeover_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// ControlServer is the server API for Control service.
// All implementations must embed UnimplementedControlServer
// for forward compatibility.
type ControlServer interface {
ListClients(context.Context, *ListClientsRequest) (*ListClientsResponse, error)
GetClient(context.Context, *GetClientRequest) (*GetClientResponse, error)
ListCommands(context.Context, *ListCommandsRequest) (*ListCommandsResponse, error)
GetCommand(context.Context, *GetCommandRequest) (*GetCommandResponse, error)
RunCommand(context.Context, *RunCommandRequest) (*RunCommandResponse, error)
FollowCommand(*FollowCommandRequest, grpc.ServerStreamingServer[FollowCommandResponse]) error
AppendStdin(context.Context, *AppendStdinRequest) (*AppendStdinResponse, error)
CloseStdin(context.Context, *CloseStdinRequest) (*CloseStdinResponse, error)
SignalCommand(context.Context, *ControlSignalCommandRequest) (*ControlSignalCommandResponse, error)
GetOutput(context.Context, *GetOutputRequest) (*GetOutputResponse, error)
ListStorageIncidents(context.Context, *ListStorageIncidentsRequest) (*ListStorageIncidentsResponse, error)
RepairStorageIncident(context.Context, *RepairStorageIncidentRequest) (*RepairStorageIncidentResponse, error)
AcknowledgeStorageIncident(context.Context, *AcknowledgeStorageIncidentRequest) (*AcknowledgeStorageIncidentResponse, error)
AuthorizeClientTakeover(context.Context, *AuthorizeClientTakeoverRequest) (*AuthorizeClientTakeoverResponse, error)
mustEmbedUnimplementedControlServer()
}
// UnimplementedControlServer must be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedControlServer struct{}
func (UnimplementedControlServer) ListClients(context.Context, *ListClientsRequest) (*ListClientsResponse, error) {
return nil, status.Error(codes.Unimplemented, "method ListClients not implemented")
}
func (UnimplementedControlServer) GetClient(context.Context, *GetClientRequest) (*GetClientResponse, error) {
return nil, status.Error(codes.Unimplemented, "method GetClient not implemented")
}
func (UnimplementedControlServer) ListCommands(context.Context, *ListCommandsRequest) (*ListCommandsResponse, error) {
return nil, status.Error(codes.Unimplemented, "method ListCommands not implemented")
}
func (UnimplementedControlServer) GetCommand(context.Context, *GetCommandRequest) (*GetCommandResponse, error) {
return nil, status.Error(codes.Unimplemented, "method GetCommand not implemented")
}
func (UnimplementedControlServer) RunCommand(context.Context, *RunCommandRequest) (*RunCommandResponse, error) {
return nil, status.Error(codes.Unimplemented, "method RunCommand not implemented")
}
func (UnimplementedControlServer) FollowCommand(*FollowCommandRequest, grpc.ServerStreamingServer[FollowCommandResponse]) error {
return status.Error(codes.Unimplemented, "method FollowCommand not implemented")
}
func (UnimplementedControlServer) AppendStdin(context.Context, *AppendStdinRequest) (*AppendStdinResponse, error) {
return nil, status.Error(codes.Unimplemented, "method AppendStdin not implemented")
}
func (UnimplementedControlServer) CloseStdin(context.Context, *CloseStdinRequest) (*CloseStdinResponse, error) {
return nil, status.Error(codes.Unimplemented, "method CloseStdin not implemented")
}
func (UnimplementedControlServer) SignalCommand(context.Context, *ControlSignalCommandRequest) (*ControlSignalCommandResponse, error) {
return nil, status.Error(codes.Unimplemented, "method SignalCommand not implemented")
}
func (UnimplementedControlServer) GetOutput(context.Context, *GetOutputRequest) (*GetOutputResponse, error) {
return nil, status.Error(codes.Unimplemented, "method GetOutput not implemented")
}
func (UnimplementedControlServer) ListStorageIncidents(context.Context, *ListStorageIncidentsRequest) (*ListStorageIncidentsResponse, error) {
return nil, status.Error(codes.Unimplemented, "method ListStorageIncidents not implemented")
}
func (UnimplementedControlServer) RepairStorageIncident(context.Context, *RepairStorageIncidentRequest) (*RepairStorageIncidentResponse, error) {
return nil, status.Error(codes.Unimplemented, "method RepairStorageIncident not implemented")
}
func (UnimplementedControlServer) AcknowledgeStorageIncident(context.Context, *AcknowledgeStorageIncidentRequest) (*AcknowledgeStorageIncidentResponse, error) {
return nil, status.Error(codes.Unimplemented, "method AcknowledgeStorageIncident not implemented")
}
func (UnimplementedControlServer) AuthorizeClientTakeover(context.Context, *AuthorizeClientTakeoverRequest) (*AuthorizeClientTakeoverResponse, error) {
return nil, status.Error(codes.Unimplemented, "method AuthorizeClientTakeover not implemented")
}
func (UnimplementedControlServer) mustEmbedUnimplementedControlServer() {}
func (UnimplementedControlServer) testEmbeddedByValue() {}
// UnsafeControlServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to ControlServer will
// result in compilation errors.
type UnsafeControlServer interface {
mustEmbedUnimplementedControlServer()
}
func RegisterControlServer(s grpc.ServiceRegistrar, srv ControlServer) {
// If the following call panics, it indicates UnimplementedControlServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&Control_ServiceDesc, srv)
}
func _Control_ListClients_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListClientsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ControlServer).ListClients(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Control_ListClients_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ControlServer).ListClients(ctx, req.(*ListClientsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Control_GetClient_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetClientRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ControlServer).GetClient(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Control_GetClient_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ControlServer).GetClient(ctx, req.(*GetClientRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Control_ListCommands_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListCommandsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ControlServer).ListCommands(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Control_ListCommands_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ControlServer).ListCommands(ctx, req.(*ListCommandsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Control_GetCommand_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetCommandRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ControlServer).GetCommand(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Control_GetCommand_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ControlServer).GetCommand(ctx, req.(*GetCommandRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Control_RunCommand_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RunCommandRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ControlServer).RunCommand(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Control_RunCommand_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ControlServer).RunCommand(ctx, req.(*RunCommandRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Control_FollowCommand_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(FollowCommandRequest)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(ControlServer).FollowCommand(m, &grpc.GenericServerStream[FollowCommandRequest, FollowCommandResponse]{ServerStream: stream})
}
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type Control_FollowCommandServer = grpc.ServerStreamingServer[FollowCommandResponse]
func _Control_AppendStdin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(AppendStdinRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ControlServer).AppendStdin(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Control_AppendStdin_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ControlServer).AppendStdin(ctx, req.(*AppendStdinRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Control_CloseStdin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CloseStdinRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ControlServer).CloseStdin(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Control_CloseStdin_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ControlServer).CloseStdin(ctx, req.(*CloseStdinRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Control_SignalCommand_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ControlSignalCommandRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ControlServer).SignalCommand(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Control_SignalCommand_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ControlServer).SignalCommand(ctx, req.(*ControlSignalCommandRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Control_GetOutput_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetOutputRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ControlServer).GetOutput(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Control_GetOutput_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ControlServer).GetOutput(ctx, req.(*GetOutputRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Control_ListStorageIncidents_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListStorageIncidentsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ControlServer).ListStorageIncidents(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Control_ListStorageIncidents_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ControlServer).ListStorageIncidents(ctx, req.(*ListStorageIncidentsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Control_RepairStorageIncident_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RepairStorageIncidentRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ControlServer).RepairStorageIncident(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Control_RepairStorageIncident_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ControlServer).RepairStorageIncident(ctx, req.(*RepairStorageIncidentRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Control_AcknowledgeStorageIncident_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(AcknowledgeStorageIncidentRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ControlServer).AcknowledgeStorageIncident(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Control_AcknowledgeStorageIncident_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ControlServer).AcknowledgeStorageIncident(ctx, req.(*AcknowledgeStorageIncidentRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Control_AuthorizeClientTakeover_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(AuthorizeClientTakeoverRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ControlServer).AuthorizeClientTakeover(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Control_AuthorizeClientTakeover_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ControlServer).AuthorizeClientTakeover(ctx, req.(*AuthorizeClientTakeoverRequest))
}
return interceptor(ctx, in, info, handler)
}
// Control_ServiceDesc is the grpc.ServiceDesc for Control service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Control_ServiceDesc = grpc.ServiceDesc{
ServiceName: "rvbox.v1.Control",
HandlerType: (*ControlServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "ListClients",
Handler: _Control_ListClients_Handler,
},
{
MethodName: "GetClient",
Handler: _Control_GetClient_Handler,
},
{
MethodName: "ListCommands",
Handler: _Control_ListCommands_Handler,
},
{
MethodName: "GetCommand",
Handler: _Control_GetCommand_Handler,
},
{
MethodName: "RunCommand",
Handler: _Control_RunCommand_Handler,
},
{
MethodName: "AppendStdin",
Handler: _Control_AppendStdin_Handler,
},
{
MethodName: "CloseStdin",
Handler: _Control_CloseStdin_Handler,
},
{
MethodName: "SignalCommand",
Handler: _Control_SignalCommand_Handler,
},
{
MethodName: "GetOutput",
Handler: _Control_GetOutput_Handler,
},
{
MethodName: "ListStorageIncidents",
Handler: _Control_ListStorageIncidents_Handler,
},
{
MethodName: "RepairStorageIncident",
Handler: _Control_RepairStorageIncident_Handler,
},
{
MethodName: "AcknowledgeStorageIncident",
Handler: _Control_AcknowledgeStorageIncident_Handler,
},
{
MethodName: "AuthorizeClientTakeover",
Handler: _Control_AuthorizeClientTakeover_Handler,
},
},
Streams: []grpc.StreamDesc{
{
StreamName: "FollowCommand",
Handler: _Control_FollowCommand_Handler,
ServerStreams: true,
},
},
Metadata: "rvbox/v1/control.proto",
}