2022-03-22 11:03:15 -04:00
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
2022-04-28 04:28:50 -04:00
// versions:
// - protoc-gen-go-grpc v1.2.0
2022-10-21 07:15:24 -04:00
// - protoc v3.21.8
2022-04-28 04:28:50 -04:00
// source: debugd.proto
2022-03-22 11:03:15 -04:00
package service
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
// DebugdClient is the client API for Debugd 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 DebugdClient interface {
2022-11-16 10:43:54 -05:00
SetInfo ( ctx context . Context , in * SetInfoRequest , opts ... grpc . CallOption ) ( * SetInfoResponse , error )
GetInfo ( ctx context . Context , in * GetInfoRequest , opts ... grpc . CallOption ) ( * GetInfoResponse , error )
2023-01-20 04:11:41 -05:00
UploadFiles ( ctx context . Context , opts ... grpc . CallOption ) ( Debugd_UploadFilesClient , error )
DownloadFiles ( ctx context . Context , in * DownloadFilesRequest , opts ... grpc . CallOption ) ( Debugd_DownloadFilesClient , error )
2022-03-22 11:03:15 -04:00
UploadSystemServiceUnits ( ctx context . Context , in * UploadSystemdServiceUnitsRequest , opts ... grpc . CallOption ) ( * UploadSystemdServiceUnitsResponse , error )
}
type debugdClient struct {
cc grpc . ClientConnInterface
}
func NewDebugdClient ( cc grpc . ClientConnInterface ) DebugdClient {
return & debugdClient { cc }
}
2022-11-16 10:43:54 -05:00
func ( c * debugdClient ) SetInfo ( ctx context . Context , in * SetInfoRequest , opts ... grpc . CallOption ) ( * SetInfoResponse , error ) {
out := new ( SetInfoResponse )
err := c . cc . Invoke ( ctx , "/debugd.Debugd/SetInfo" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * debugdClient ) GetInfo ( ctx context . Context , in * GetInfoRequest , opts ... grpc . CallOption ) ( * GetInfoResponse , error ) {
out := new ( GetInfoResponse )
err := c . cc . Invoke ( ctx , "/debugd.Debugd/GetInfo" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
2023-01-20 04:11:41 -05:00
func ( c * debugdClient ) UploadFiles ( ctx context . Context , opts ... grpc . CallOption ) ( Debugd_UploadFilesClient , error ) {
stream , err := c . cc . NewStream ( ctx , & Debugd_ServiceDesc . Streams [ 0 ] , "/debugd.Debugd/UploadFiles" , opts ... )
2022-03-22 11:03:15 -04:00
if err != nil {
return nil , err
}
2023-01-20 04:11:41 -05:00
x := & debugdUploadFilesClient { stream }
2022-03-22 11:03:15 -04:00
return x , nil
}
2023-01-20 04:11:41 -05:00
type Debugd_UploadFilesClient interface {
Send ( * FileTransferMessage ) error
CloseAndRecv ( ) ( * UploadFilesResponse , error )
2022-03-22 11:03:15 -04:00
grpc . ClientStream
}
2023-01-20 04:11:41 -05:00
type debugdUploadFilesClient struct {
2022-03-22 11:03:15 -04:00
grpc . ClientStream
}
2023-01-20 04:11:41 -05:00
func ( x * debugdUploadFilesClient ) Send ( m * FileTransferMessage ) error {
2022-03-22 11:03:15 -04:00
return x . ClientStream . SendMsg ( m )
}
2023-01-20 04:11:41 -05:00
func ( x * debugdUploadFilesClient ) CloseAndRecv ( ) ( * UploadFilesResponse , error ) {
2022-03-22 11:03:15 -04:00
if err := x . ClientStream . CloseSend ( ) ; err != nil {
return nil , err
}
2023-01-20 04:11:41 -05:00
m := new ( UploadFilesResponse )
2022-03-22 11:03:15 -04:00
if err := x . ClientStream . RecvMsg ( m ) ; err != nil {
return nil , err
}
return m , nil
}
2023-01-20 04:11:41 -05:00
func ( c * debugdClient ) DownloadFiles ( ctx context . Context , in * DownloadFilesRequest , opts ... grpc . CallOption ) ( Debugd_DownloadFilesClient , error ) {
stream , err := c . cc . NewStream ( ctx , & Debugd_ServiceDesc . Streams [ 1 ] , "/debugd.Debugd/DownloadFiles" , opts ... )
2022-03-22 11:03:15 -04:00
if err != nil {
return nil , err
}
2023-01-20 04:11:41 -05:00
x := & debugdDownloadFilesClient { stream }
2022-03-22 11:03:15 -04:00
if err := x . ClientStream . SendMsg ( in ) ; err != nil {
return nil , err
}
if err := x . ClientStream . CloseSend ( ) ; err != nil {
return nil , err
}
return x , nil
}
2023-01-20 04:11:41 -05:00
type Debugd_DownloadFilesClient interface {
Recv ( ) ( * FileTransferMessage , error )
2022-03-22 11:03:15 -04:00
grpc . ClientStream
}
2023-01-20 04:11:41 -05:00
type debugdDownloadFilesClient struct {
2022-03-22 11:03:15 -04:00
grpc . ClientStream
}
2023-01-20 04:11:41 -05:00
func ( x * debugdDownloadFilesClient ) Recv ( ) ( * FileTransferMessage , error ) {
m := new ( FileTransferMessage )
2022-03-22 11:03:15 -04:00
if err := x . ClientStream . RecvMsg ( m ) ; err != nil {
return nil , err
}
return m , nil
}
func ( c * debugdClient ) UploadSystemServiceUnits ( ctx context . Context , in * UploadSystemdServiceUnitsRequest , opts ... grpc . CallOption ) ( * UploadSystemdServiceUnitsResponse , error ) {
out := new ( UploadSystemdServiceUnitsResponse )
err := c . cc . Invoke ( ctx , "/debugd.Debugd/UploadSystemServiceUnits" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
// DebugdServer is the server API for Debugd service.
// All implementations must embed UnimplementedDebugdServer
// for forward compatibility
type DebugdServer interface {
2022-11-16 10:43:54 -05:00
SetInfo ( context . Context , * SetInfoRequest ) ( * SetInfoResponse , error )
GetInfo ( context . Context , * GetInfoRequest ) ( * GetInfoResponse , error )
2023-01-20 04:11:41 -05:00
UploadFiles ( Debugd_UploadFilesServer ) error
DownloadFiles ( * DownloadFilesRequest , Debugd_DownloadFilesServer ) error
2022-03-22 11:03:15 -04:00
UploadSystemServiceUnits ( context . Context , * UploadSystemdServiceUnitsRequest ) ( * UploadSystemdServiceUnitsResponse , error )
mustEmbedUnimplementedDebugdServer ( )
}
// UnimplementedDebugdServer must be embedded to have forward compatible implementations.
type UnimplementedDebugdServer struct {
}
2022-11-16 10:43:54 -05:00
func ( UnimplementedDebugdServer ) SetInfo ( context . Context , * SetInfoRequest ) ( * SetInfoResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method SetInfo not implemented" )
}
func ( UnimplementedDebugdServer ) GetInfo ( context . Context , * GetInfoRequest ) ( * GetInfoResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method GetInfo not implemented" )
}
2023-01-20 04:11:41 -05:00
func ( UnimplementedDebugdServer ) UploadFiles ( Debugd_UploadFilesServer ) error {
return status . Errorf ( codes . Unimplemented , "method UploadFiles not implemented" )
2022-03-22 11:03:15 -04:00
}
2023-01-20 04:11:41 -05:00
func ( UnimplementedDebugdServer ) DownloadFiles ( * DownloadFilesRequest , Debugd_DownloadFilesServer ) error {
return status . Errorf ( codes . Unimplemented , "method DownloadFiles not implemented" )
2022-03-22 11:03:15 -04:00
}
func ( UnimplementedDebugdServer ) UploadSystemServiceUnits ( context . Context , * UploadSystemdServiceUnitsRequest ) ( * UploadSystemdServiceUnitsResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method UploadSystemServiceUnits not implemented" )
}
func ( UnimplementedDebugdServer ) mustEmbedUnimplementedDebugdServer ( ) { }
// UnsafeDebugdServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to DebugdServer will
// result in compilation errors.
type UnsafeDebugdServer interface {
mustEmbedUnimplementedDebugdServer ( )
}
func RegisterDebugdServer ( s grpc . ServiceRegistrar , srv DebugdServer ) {
s . RegisterService ( & Debugd_ServiceDesc , srv )
}
2022-11-16 10:43:54 -05:00
func _Debugd_SetInfo_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( SetInfoRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( DebugdServer ) . SetInfo ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/debugd.Debugd/SetInfo" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( DebugdServer ) . SetInfo ( ctx , req . ( * SetInfoRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
func _Debugd_GetInfo_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( GetInfoRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( DebugdServer ) . GetInfo ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/debugd.Debugd/GetInfo" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( DebugdServer ) . GetInfo ( ctx , req . ( * GetInfoRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
2023-01-20 04:11:41 -05:00
func _Debugd_UploadFiles_Handler ( srv interface { } , stream grpc . ServerStream ) error {
return srv . ( DebugdServer ) . UploadFiles ( & debugdUploadFilesServer { stream } )
2022-03-22 11:03:15 -04:00
}
2023-01-20 04:11:41 -05:00
type Debugd_UploadFilesServer interface {
SendAndClose ( * UploadFilesResponse ) error
Recv ( ) ( * FileTransferMessage , error )
2022-03-22 11:03:15 -04:00
grpc . ServerStream
}
2023-01-20 04:11:41 -05:00
type debugdUploadFilesServer struct {
2022-03-22 11:03:15 -04:00
grpc . ServerStream
}
2023-01-20 04:11:41 -05:00
func ( x * debugdUploadFilesServer ) SendAndClose ( m * UploadFilesResponse ) error {
2022-03-22 11:03:15 -04:00
return x . ServerStream . SendMsg ( m )
}
2023-01-20 04:11:41 -05:00
func ( x * debugdUploadFilesServer ) Recv ( ) ( * FileTransferMessage , error ) {
m := new ( FileTransferMessage )
2022-03-22 11:03:15 -04:00
if err := x . ServerStream . RecvMsg ( m ) ; err != nil {
return nil , err
}
return m , nil
}
2023-01-20 04:11:41 -05:00
func _Debugd_DownloadFiles_Handler ( srv interface { } , stream grpc . ServerStream ) error {
m := new ( DownloadFilesRequest )
2022-03-22 11:03:15 -04:00
if err := stream . RecvMsg ( m ) ; err != nil {
return err
}
2023-01-20 04:11:41 -05:00
return srv . ( DebugdServer ) . DownloadFiles ( m , & debugdDownloadFilesServer { stream } )
2022-03-22 11:03:15 -04:00
}
2023-01-20 04:11:41 -05:00
type Debugd_DownloadFilesServer interface {
Send ( * FileTransferMessage ) error
2022-03-22 11:03:15 -04:00
grpc . ServerStream
}
2023-01-20 04:11:41 -05:00
type debugdDownloadFilesServer struct {
2022-03-22 11:03:15 -04:00
grpc . ServerStream
}
2023-01-20 04:11:41 -05:00
func ( x * debugdDownloadFilesServer ) Send ( m * FileTransferMessage ) error {
2022-03-22 11:03:15 -04:00
return x . ServerStream . SendMsg ( m )
}
func _Debugd_UploadSystemServiceUnits_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( UploadSystemdServiceUnitsRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( DebugdServer ) . UploadSystemServiceUnits ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/debugd.Debugd/UploadSystemServiceUnits" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( DebugdServer ) . UploadSystemServiceUnits ( ctx , req . ( * UploadSystemdServiceUnitsRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
// Debugd_ServiceDesc is the grpc.ServiceDesc for Debugd service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Debugd_ServiceDesc = grpc . ServiceDesc {
ServiceName : "debugd.Debugd" ,
HandlerType : ( * DebugdServer ) ( nil ) ,
Methods : [ ] grpc . MethodDesc {
2022-11-16 10:43:54 -05:00
{
MethodName : "SetInfo" ,
Handler : _Debugd_SetInfo_Handler ,
} ,
{
MethodName : "GetInfo" ,
Handler : _Debugd_GetInfo_Handler ,
} ,
2022-03-22 11:03:15 -04:00
{
MethodName : "UploadSystemServiceUnits" ,
Handler : _Debugd_UploadSystemServiceUnits_Handler ,
} ,
} ,
Streams : [ ] grpc . StreamDesc {
{
2023-01-20 04:11:41 -05:00
StreamName : "UploadFiles" ,
Handler : _Debugd_UploadFiles_Handler ,
2022-03-22 11:03:15 -04:00
ClientStreams : true ,
} ,
{
2023-01-20 04:11:41 -05:00
StreamName : "DownloadFiles" ,
Handler : _Debugd_DownloadFiles_Handler ,
2022-03-22 11:03:15 -04:00
ServerStreams : true ,
} ,
} ,
2022-04-12 08:24:36 -04:00
Metadata : "debugd.proto" ,
2022-03-22 11:03:15 -04:00
}