2023-03-16 11:17:19 +02:00
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
package litrpc
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
// ProxyClient is the client API for Proxy 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 ProxyClient interface {
2023-03-19 19:55:46 +02:00
// litcli: `getinfo`
// GetInfo returns general information concerning the LiTd node.
2023-03-16 11:17:19 +02:00
GetInfo ( ctx context . Context , in * GetInfoRequest , opts ... grpc . CallOption ) ( * GetInfoResponse , error )
2023-03-19 19:55:46 +02:00
// litcli: `stop`
// StopDaemon will send a shutdown request to the interrupt handler,
// triggering a graceful shutdown of the daemon.
2023-03-16 11:17:19 +02:00
StopDaemon ( ctx context . Context , in * StopDaemonRequest , opts ... grpc . CallOption ) ( * StopDaemonResponse , error )
2023-06-06 17:02:05 +02:00
// litcli: `bakesupermacaroon`
// BakeSuperMacaroon bakes a new macaroon that includes permissions for
// all the active daemons that LiT is connected to.
BakeSuperMacaroon ( ctx context . Context , in * BakeSuperMacaroonRequest , opts ... grpc . CallOption ) ( * BakeSuperMacaroonResponse , error )
2023-03-16 11:17:19 +02:00
}
type proxyClient struct {
cc grpc . ClientConnInterface
}
func NewProxyClient ( cc grpc . ClientConnInterface ) ProxyClient {
return & proxyClient { cc }
}
func ( c * proxyClient ) GetInfo ( ctx context . Context , in * GetInfoRequest , opts ... grpc . CallOption ) ( * GetInfoResponse , error ) {
out := new ( GetInfoResponse )
err := c . cc . Invoke ( ctx , "/litrpc.Proxy/GetInfo" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * proxyClient ) StopDaemon ( ctx context . Context , in * StopDaemonRequest , opts ... grpc . CallOption ) ( * StopDaemonResponse , error ) {
out := new ( StopDaemonResponse )
err := c . cc . Invoke ( ctx , "/litrpc.Proxy/StopDaemon" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
2023-06-06 17:02:05 +02:00
func ( c * proxyClient ) BakeSuperMacaroon ( ctx context . Context , in * BakeSuperMacaroonRequest , opts ... grpc . CallOption ) ( * BakeSuperMacaroonResponse , error ) {
out := new ( BakeSuperMacaroonResponse )
err := c . cc . Invoke ( ctx , "/litrpc.Proxy/BakeSuperMacaroon" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
2023-03-16 11:17:19 +02:00
// ProxyServer is the server API for Proxy service.
// All implementations must embed UnimplementedProxyServer
// for forward compatibility
type ProxyServer interface {
2023-03-19 19:55:46 +02:00
// litcli: `getinfo`
// GetInfo returns general information concerning the LiTd node.
2023-03-16 11:17:19 +02:00
GetInfo ( context . Context , * GetInfoRequest ) ( * GetInfoResponse , error )
2023-03-19 19:55:46 +02:00
// litcli: `stop`
// StopDaemon will send a shutdown request to the interrupt handler,
// triggering a graceful shutdown of the daemon.
2023-03-16 11:17:19 +02:00
StopDaemon ( context . Context , * StopDaemonRequest ) ( * StopDaemonResponse , error )
2023-06-06 17:02:05 +02:00
// litcli: `bakesupermacaroon`
// BakeSuperMacaroon bakes a new macaroon that includes permissions for
// all the active daemons that LiT is connected to.
BakeSuperMacaroon ( context . Context , * BakeSuperMacaroonRequest ) ( * BakeSuperMacaroonResponse , error )
2023-03-16 11:17:19 +02:00
mustEmbedUnimplementedProxyServer ( )
}
// UnimplementedProxyServer must be embedded to have forward compatible implementations.
type UnimplementedProxyServer struct {
}
func ( UnimplementedProxyServer ) GetInfo ( context . Context , * GetInfoRequest ) ( * GetInfoResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method GetInfo not implemented" )
}
func ( UnimplementedProxyServer ) StopDaemon ( context . Context , * StopDaemonRequest ) ( * StopDaemonResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method StopDaemon not implemented" )
}
2023-06-06 17:02:05 +02:00
func ( UnimplementedProxyServer ) BakeSuperMacaroon ( context . Context , * BakeSuperMacaroonRequest ) ( * BakeSuperMacaroonResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method BakeSuperMacaroon not implemented" )
}
2023-03-16 11:17:19 +02:00
func ( UnimplementedProxyServer ) mustEmbedUnimplementedProxyServer ( ) { }
// UnsafeProxyServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to ProxyServer will
// result in compilation errors.
type UnsafeProxyServer interface {
mustEmbedUnimplementedProxyServer ( )
}
func RegisterProxyServer ( s grpc . ServiceRegistrar , srv ProxyServer ) {
s . RegisterService ( & Proxy_ServiceDesc , srv )
}
func _Proxy_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 . ( ProxyServer ) . GetInfo ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/litrpc.Proxy/GetInfo" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( ProxyServer ) . GetInfo ( ctx , req . ( * GetInfoRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
func _Proxy_StopDaemon_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( StopDaemonRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( ProxyServer ) . StopDaemon ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/litrpc.Proxy/StopDaemon" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( ProxyServer ) . StopDaemon ( ctx , req . ( * StopDaemonRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
2023-06-06 17:02:05 +02:00
func _Proxy_BakeSuperMacaroon_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( BakeSuperMacaroonRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( ProxyServer ) . BakeSuperMacaroon ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/litrpc.Proxy/BakeSuperMacaroon" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( ProxyServer ) . BakeSuperMacaroon ( ctx , req . ( * BakeSuperMacaroonRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
2023-03-16 11:17:19 +02:00
// Proxy_ServiceDesc is the grpc.ServiceDesc for Proxy service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Proxy_ServiceDesc = grpc . ServiceDesc {
ServiceName : "litrpc.Proxy" ,
HandlerType : ( * ProxyServer ) ( nil ) ,
Methods : [ ] grpc . MethodDesc {
{
MethodName : "GetInfo" ,
Handler : _Proxy_GetInfo_Handler ,
} ,
{
MethodName : "StopDaemon" ,
Handler : _Proxy_StopDaemon_Handler ,
} ,
2023-06-06 17:02:05 +02:00
{
MethodName : "BakeSuperMacaroon" ,
Handler : _Proxy_BakeSuperMacaroon_Handler ,
} ,
2023-03-16 11:17:19 +02:00
} ,
Streams : [ ] grpc . StreamDesc { } ,
Metadata : "proxy.proto" ,
}