2022-04-11 08:25:19 -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-09-08 08:45:27 -04:00
// source: recover.proto
2022-04-11 08:25:19 -04:00
2022-09-08 08:45:27 -04:00
package recoverproto
2022-04-11 08:25:19 -04:00
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
// APIClient is the client API for API 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 APIClient interface {
2022-09-08 08:45:27 -04:00
Recover ( ctx context . Context , opts ... grpc . CallOption ) ( API_RecoverClient , error )
2022-04-11 08:25:19 -04:00
}
type aPIClient struct {
cc grpc . ClientConnInterface
}
func NewAPIClient ( cc grpc . ClientConnInterface ) APIClient {
return & aPIClient { cc }
}
2022-09-08 08:45:27 -04:00
func ( c * aPIClient ) Recover ( ctx context . Context , opts ... grpc . CallOption ) ( API_RecoverClient , error ) {
stream , err := c . cc . NewStream ( ctx , & API_ServiceDesc . Streams [ 0 ] , "/recoverproto.API/Recover" , opts ... )
2022-04-11 08:25:19 -04:00
if err != nil {
return nil , err
}
2022-09-08 08:45:27 -04:00
x := & aPIRecoverClient { stream }
return x , nil
}
type API_RecoverClient interface {
Send ( * RecoverMessage ) error
Recv ( ) ( * RecoverResponse , error )
grpc . ClientStream
}
type aPIRecoverClient struct {
grpc . ClientStream
}
func ( x * aPIRecoverClient ) Send ( m * RecoverMessage ) error {
return x . ClientStream . SendMsg ( m )
}
func ( x * aPIRecoverClient ) Recv ( ) ( * RecoverResponse , error ) {
m := new ( RecoverResponse )
if err := x . ClientStream . RecvMsg ( m ) ; err != nil {
return nil , err
}
return m , nil
2022-04-11 08:25:19 -04:00
}
// APIServer is the server API for API service.
// All implementations must embed UnimplementedAPIServer
// for forward compatibility
type APIServer interface {
2022-09-08 08:45:27 -04:00
Recover ( API_RecoverServer ) error
2022-04-11 08:25:19 -04:00
mustEmbedUnimplementedAPIServer ( )
}
// UnimplementedAPIServer must be embedded to have forward compatible implementations.
type UnimplementedAPIServer struct {
}
2022-09-08 08:45:27 -04:00
func ( UnimplementedAPIServer ) Recover ( API_RecoverServer ) error {
return status . Errorf ( codes . Unimplemented , "method Recover not implemented" )
2022-04-11 08:25:19 -04:00
}
func ( UnimplementedAPIServer ) mustEmbedUnimplementedAPIServer ( ) { }
// UnsafeAPIServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to APIServer will
// result in compilation errors.
type UnsafeAPIServer interface {
mustEmbedUnimplementedAPIServer ( )
}
func RegisterAPIServer ( s grpc . ServiceRegistrar , srv APIServer ) {
s . RegisterService ( & API_ServiceDesc , srv )
}
2022-09-08 08:45:27 -04:00
func _API_Recover_Handler ( srv interface { } , stream grpc . ServerStream ) error {
return srv . ( APIServer ) . Recover ( & aPIRecoverServer { stream } )
}
type API_RecoverServer interface {
Send ( * RecoverResponse ) error
Recv ( ) ( * RecoverMessage , error )
grpc . ServerStream
}
type aPIRecoverServer struct {
grpc . ServerStream
}
func ( x * aPIRecoverServer ) Send ( m * RecoverResponse ) error {
return x . ServerStream . SendMsg ( m )
}
func ( x * aPIRecoverServer ) Recv ( ) ( * RecoverMessage , error ) {
m := new ( RecoverMessage )
if err := x . ServerStream . RecvMsg ( m ) ; err != nil {
2022-04-11 08:25:19 -04:00
return nil , err
}
2022-09-08 08:45:27 -04:00
return m , nil
2022-04-11 08:25:19 -04:00
}
// API_ServiceDesc is the grpc.ServiceDesc for API service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var API_ServiceDesc = grpc . ServiceDesc {
2022-09-08 08:45:27 -04:00
ServiceName : "recoverproto.API" ,
2022-04-11 08:25:19 -04:00
HandlerType : ( * APIServer ) ( nil ) ,
2022-09-08 08:45:27 -04:00
Methods : [ ] grpc . MethodDesc { } ,
Streams : [ ] grpc . StreamDesc {
2022-04-11 08:25:19 -04:00
{
2022-09-08 08:45:27 -04:00
StreamName : "Recover" ,
Handler : _API_Recover_Handler ,
ServerStreams : true ,
ClientStreams : true ,
2022-04-11 08:25:19 -04:00
} ,
} ,
2022-09-08 08:45:27 -04:00
Metadata : "recover.proto" ,
2022-04-11 08:25:19 -04:00
}