mirror of
https://github.com/lightninglabs/lightning-terminal.git
synced 2026-08-13 12:33:36 +02:00
189 lines
6.8 KiB
Go
189 lines
6.8 KiB
Go
// 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 {
|
|
// litcli: `getinfo`
|
|
// GetInfo returns general information concerning the LiTd node.
|
|
GetInfo(ctx context.Context, in *GetInfoRequest, opts ...grpc.CallOption) (*GetInfoResponse, error)
|
|
// litcli: `stop`
|
|
// StopDaemon will send a shutdown request to the interrupt handler,
|
|
// triggering a graceful shutdown of the daemon.
|
|
StopDaemon(ctx context.Context, in *StopDaemonRequest, opts ...grpc.CallOption) (*StopDaemonResponse, error)
|
|
// 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)
|
|
}
|
|
|
|
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
|
|
}
|
|
|
|
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
|
|
}
|
|
|
|
// ProxyServer is the server API for Proxy service.
|
|
// All implementations must embed UnimplementedProxyServer
|
|
// for forward compatibility
|
|
type ProxyServer interface {
|
|
// litcli: `getinfo`
|
|
// GetInfo returns general information concerning the LiTd node.
|
|
GetInfo(context.Context, *GetInfoRequest) (*GetInfoResponse, error)
|
|
// litcli: `stop`
|
|
// StopDaemon will send a shutdown request to the interrupt handler,
|
|
// triggering a graceful shutdown of the daemon.
|
|
StopDaemon(context.Context, *StopDaemonRequest) (*StopDaemonResponse, error)
|
|
// 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)
|
|
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")
|
|
}
|
|
func (UnimplementedProxyServer) BakeSuperMacaroon(context.Context, *BakeSuperMacaroonRequest) (*BakeSuperMacaroonResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method BakeSuperMacaroon not implemented")
|
|
}
|
|
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)
|
|
}
|
|
|
|
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)
|
|
}
|
|
|
|
// 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,
|
|
},
|
|
{
|
|
MethodName: "BakeSuperMacaroon",
|
|
Handler: _Proxy_BakeSuperMacaroon_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "proxy.proto",
|
|
}
|