2020-08-12 13:47:59 +00:00
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
package remote
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.
2020-09-28 17:18:36 +00:00
const _ = grpc . SupportPackageIsVersion7
2020-08-12 13:47:59 +00:00
// ETHBACKENDClient is the client API for ETHBACKEND 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 ETHBACKENDClient interface {
Add ( ctx context . Context , in * TxRequest , opts ... grpc . CallOption ) ( * AddReply , error )
Etherbase ( ctx context . Context , in * EtherbaseRequest , opts ... grpc . CallOption ) ( * EtherbaseReply , error )
NetVersion ( ctx context . Context , in * NetVersionRequest , opts ... grpc . CallOption ) ( * NetVersionReply , error )
2020-11-17 19:13:41 +00:00
Subscribe ( ctx context . Context , in * SubscribeRequest , opts ... grpc . CallOption ) ( ETHBACKEND_SubscribeClient , error )
2020-08-12 13:47:59 +00:00
}
type eTHBACKENDClient struct {
cc grpc . ClientConnInterface
}
func NewETHBACKENDClient ( cc grpc . ClientConnInterface ) ETHBACKENDClient {
return & eTHBACKENDClient { cc }
}
func ( c * eTHBACKENDClient ) Add ( ctx context . Context , in * TxRequest , opts ... grpc . CallOption ) ( * AddReply , error ) {
out := new ( AddReply )
err := c . cc . Invoke ( ctx , "/remote.ETHBACKEND/Add" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * eTHBACKENDClient ) Etherbase ( ctx context . Context , in * EtherbaseRequest , opts ... grpc . CallOption ) ( * EtherbaseReply , error ) {
out := new ( EtherbaseReply )
err := c . cc . Invoke ( ctx , "/remote.ETHBACKEND/Etherbase" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * eTHBACKENDClient ) NetVersion ( ctx context . Context , in * NetVersionRequest , opts ... grpc . CallOption ) ( * NetVersionReply , error ) {
out := new ( NetVersionReply )
err := c . cc . Invoke ( ctx , "/remote.ETHBACKEND/NetVersion" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
2020-11-17 19:13:41 +00:00
func ( c * eTHBACKENDClient ) Subscribe ( ctx context . Context , in * SubscribeRequest , opts ... grpc . CallOption ) ( ETHBACKEND_SubscribeClient , error ) {
stream , err := c . cc . NewStream ( ctx , & _ETHBACKEND_serviceDesc . Streams [ 0 ] , "/remote.ETHBACKEND/Subscribe" , opts ... )
if err != nil {
return nil , err
}
x := & eTHBACKENDSubscribeClient { 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
}
type ETHBACKEND_SubscribeClient interface {
Recv ( ) ( * SubscribeReply , error )
grpc . ClientStream
}
type eTHBACKENDSubscribeClient struct {
grpc . ClientStream
}
func ( x * eTHBACKENDSubscribeClient ) Recv ( ) ( * SubscribeReply , error ) {
m := new ( SubscribeReply )
if err := x . ClientStream . RecvMsg ( m ) ; err != nil {
return nil , err
}
return m , nil
}
2020-10-24 06:54:03 +00:00
// ETHBACKENDServer is the server API for ETHBACKEND service.
// All implementations must embed UnimplementedETHBACKENDServer
// for forward compatibility
type ETHBACKENDServer interface {
Add ( context . Context , * TxRequest ) ( * AddReply , error )
Etherbase ( context . Context , * EtherbaseRequest ) ( * EtherbaseReply , error )
NetVersion ( context . Context , * NetVersionRequest ) ( * NetVersionReply , error )
2020-11-17 19:13:41 +00:00
Subscribe ( * SubscribeRequest , ETHBACKEND_SubscribeServer ) error
2020-10-24 06:54:03 +00:00
mustEmbedUnimplementedETHBACKENDServer ( )
}
// UnimplementedETHBACKENDServer must be embedded to have forward compatible implementations.
type UnimplementedETHBACKENDServer struct {
2020-08-12 13:47:59 +00:00
}
2020-10-24 06:54:03 +00:00
func ( UnimplementedETHBACKENDServer ) Add ( context . Context , * TxRequest ) ( * AddReply , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method Add not implemented" )
}
func ( UnimplementedETHBACKENDServer ) Etherbase ( context . Context , * EtherbaseRequest ) ( * EtherbaseReply , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method Etherbase not implemented" )
}
func ( UnimplementedETHBACKENDServer ) NetVersion ( context . Context , * NetVersionRequest ) ( * NetVersionReply , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method NetVersion not implemented" )
}
2020-11-17 19:13:41 +00:00
func ( UnimplementedETHBACKENDServer ) Subscribe ( * SubscribeRequest , ETHBACKEND_SubscribeServer ) error {
return status . Errorf ( codes . Unimplemented , "method Subscribe not implemented" )
}
2020-10-24 06:54:03 +00:00
func ( UnimplementedETHBACKENDServer ) mustEmbedUnimplementedETHBACKENDServer ( ) { }
// UnsafeETHBACKENDServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to ETHBACKENDServer will
// result in compilation errors.
type UnsafeETHBACKENDServer interface {
mustEmbedUnimplementedETHBACKENDServer ( )
}
func RegisterETHBACKENDServer ( s grpc . ServiceRegistrar , srv ETHBACKENDServer ) {
s . RegisterService ( & _ETHBACKEND_serviceDesc , srv )
}
func _ETHBACKEND_Add_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
2020-08-12 13:47:59 +00:00
in := new ( TxRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
2020-10-24 06:54:03 +00:00
return srv . ( ETHBACKENDServer ) . Add ( ctx , in )
2020-08-12 13:47:59 +00:00
}
info := & grpc . UnaryServerInfo {
2020-10-24 06:54:03 +00:00
Server : srv ,
2020-08-12 13:47:59 +00:00
FullMethod : "/remote.ETHBACKEND/Add" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
2020-10-24 06:54:03 +00:00
return srv . ( ETHBACKENDServer ) . Add ( ctx , req . ( * TxRequest ) )
2020-08-12 13:47:59 +00:00
}
return interceptor ( ctx , in , info , handler )
}
2020-10-24 06:54:03 +00:00
func _ETHBACKEND_Etherbase_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
2020-08-12 13:47:59 +00:00
in := new ( EtherbaseRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
2020-10-24 06:54:03 +00:00
return srv . ( ETHBACKENDServer ) . Etherbase ( ctx , in )
2020-08-12 13:47:59 +00:00
}
info := & grpc . UnaryServerInfo {
2020-10-24 06:54:03 +00:00
Server : srv ,
2020-08-12 13:47:59 +00:00
FullMethod : "/remote.ETHBACKEND/Etherbase" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
2020-10-24 06:54:03 +00:00
return srv . ( ETHBACKENDServer ) . Etherbase ( ctx , req . ( * EtherbaseRequest ) )
2020-08-12 13:47:59 +00:00
}
return interceptor ( ctx , in , info , handler )
}
2020-10-24 06:54:03 +00:00
func _ETHBACKEND_NetVersion_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
2020-08-12 13:47:59 +00:00
in := new ( NetVersionRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
2020-10-24 06:54:03 +00:00
return srv . ( ETHBACKENDServer ) . NetVersion ( ctx , in )
2020-08-12 13:47:59 +00:00
}
info := & grpc . UnaryServerInfo {
2020-10-24 06:54:03 +00:00
Server : srv ,
2020-08-12 13:47:59 +00:00
FullMethod : "/remote.ETHBACKEND/NetVersion" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
2020-10-24 06:54:03 +00:00
return srv . ( ETHBACKENDServer ) . NetVersion ( ctx , req . ( * NetVersionRequest ) )
2020-08-12 13:47:59 +00:00
}
return interceptor ( ctx , in , info , handler )
}
2020-09-03 07:51:19 +00:00
2020-11-17 19:13:41 +00:00
func _ETHBACKEND_Subscribe_Handler ( srv interface { } , stream grpc . ServerStream ) error {
m := new ( SubscribeRequest )
if err := stream . RecvMsg ( m ) ; err != nil {
return err
}
return srv . ( ETHBACKENDServer ) . Subscribe ( m , & eTHBACKENDSubscribeServer { stream } )
}
type ETHBACKEND_SubscribeServer interface {
Send ( * SubscribeReply ) error
grpc . ServerStream
}
type eTHBACKENDSubscribeServer struct {
grpc . ServerStream
}
func ( x * eTHBACKENDSubscribeServer ) Send ( m * SubscribeReply ) error {
return x . ServerStream . SendMsg ( m )
}
2020-10-24 06:54:03 +00:00
var _ETHBACKEND_serviceDesc = grpc . ServiceDesc {
ServiceName : "remote.ETHBACKEND" ,
HandlerType : ( * ETHBACKENDServer ) ( nil ) ,
Methods : [ ] grpc . MethodDesc {
{
MethodName : "Add" ,
Handler : _ETHBACKEND_Add_Handler ,
2020-08-12 13:47:59 +00:00
} ,
2020-10-24 06:54:03 +00:00
{
MethodName : "Etherbase" ,
Handler : _ETHBACKEND_Etherbase_Handler ,
} ,
{
MethodName : "NetVersion" ,
Handler : _ETHBACKEND_NetVersion_Handler ,
} ,
} ,
2020-11-17 19:13:41 +00:00
Streams : [ ] grpc . StreamDesc {
{
StreamName : "Subscribe" ,
Handler : _ETHBACKEND_Subscribe_Handler ,
ServerStreams : true ,
} ,
} ,
2020-10-24 06:54:03 +00:00
Metadata : "remote/ethbackend.proto" ,
2020-08-12 13:47:59 +00:00
}