mirror of
https://github.com/lightninglabs/lightning-terminal.git
synced 2026-08-13 12:33:36 +02:00
233 lines
9.6 KiB
Go
233 lines
9.6 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
|
|
|
|
// AutopilotClient is the client API for Autopilot 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 AutopilotClient interface {
|
|
// litcli: `autopilot features`
|
|
// ListAutopilotFeatures fetches all the features supported by the Autopilot
|
|
// server along with the rules that we need to support in order to subscribe
|
|
// to those features.
|
|
ListAutopilotFeatures(ctx context.Context, in *ListAutopilotFeaturesRequest, opts ...grpc.CallOption) (*ListAutopilotFeaturesResponse, error)
|
|
// litcli: `autopilot add`
|
|
// AddAutopilotSession creates a new LNC session and attempts to register it
|
|
// with the Autopilot server.
|
|
AddAutopilotSession(ctx context.Context, in *AddAutopilotSessionRequest, opts ...grpc.CallOption) (*AddAutopilotSessionResponse, error)
|
|
// litcli: `autopilot list`
|
|
// ListAutopilotSessions lists all the sessions that are of type
|
|
// TypeAutopilot.
|
|
ListAutopilotSessions(ctx context.Context, in *ListAutopilotSessionsRequest, opts ...grpc.CallOption) (*ListAutopilotSessionsResponse, error)
|
|
// litcli: `autopilot revoke`
|
|
// RevokeAutopilotSession revokes an Autopilot session.
|
|
RevokeAutopilotSession(ctx context.Context, in *RevokeAutopilotSessionRequest, opts ...grpc.CallOption) (*RevokeAutopilotSessionResponse, error)
|
|
}
|
|
|
|
type autopilotClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewAutopilotClient(cc grpc.ClientConnInterface) AutopilotClient {
|
|
return &autopilotClient{cc}
|
|
}
|
|
|
|
func (c *autopilotClient) ListAutopilotFeatures(ctx context.Context, in *ListAutopilotFeaturesRequest, opts ...grpc.CallOption) (*ListAutopilotFeaturesResponse, error) {
|
|
out := new(ListAutopilotFeaturesResponse)
|
|
err := c.cc.Invoke(ctx, "/litrpc.Autopilot/ListAutopilotFeatures", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *autopilotClient) AddAutopilotSession(ctx context.Context, in *AddAutopilotSessionRequest, opts ...grpc.CallOption) (*AddAutopilotSessionResponse, error) {
|
|
out := new(AddAutopilotSessionResponse)
|
|
err := c.cc.Invoke(ctx, "/litrpc.Autopilot/AddAutopilotSession", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *autopilotClient) ListAutopilotSessions(ctx context.Context, in *ListAutopilotSessionsRequest, opts ...grpc.CallOption) (*ListAutopilotSessionsResponse, error) {
|
|
out := new(ListAutopilotSessionsResponse)
|
|
err := c.cc.Invoke(ctx, "/litrpc.Autopilot/ListAutopilotSessions", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *autopilotClient) RevokeAutopilotSession(ctx context.Context, in *RevokeAutopilotSessionRequest, opts ...grpc.CallOption) (*RevokeAutopilotSessionResponse, error) {
|
|
out := new(RevokeAutopilotSessionResponse)
|
|
err := c.cc.Invoke(ctx, "/litrpc.Autopilot/RevokeAutopilotSession", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// AutopilotServer is the server API for Autopilot service.
|
|
// All implementations must embed UnimplementedAutopilotServer
|
|
// for forward compatibility
|
|
type AutopilotServer interface {
|
|
// litcli: `autopilot features`
|
|
// ListAutopilotFeatures fetches all the features supported by the Autopilot
|
|
// server along with the rules that we need to support in order to subscribe
|
|
// to those features.
|
|
ListAutopilotFeatures(context.Context, *ListAutopilotFeaturesRequest) (*ListAutopilotFeaturesResponse, error)
|
|
// litcli: `autopilot add`
|
|
// AddAutopilotSession creates a new LNC session and attempts to register it
|
|
// with the Autopilot server.
|
|
AddAutopilotSession(context.Context, *AddAutopilotSessionRequest) (*AddAutopilotSessionResponse, error)
|
|
// litcli: `autopilot list`
|
|
// ListAutopilotSessions lists all the sessions that are of type
|
|
// TypeAutopilot.
|
|
ListAutopilotSessions(context.Context, *ListAutopilotSessionsRequest) (*ListAutopilotSessionsResponse, error)
|
|
// litcli: `autopilot revoke`
|
|
// RevokeAutopilotSession revokes an Autopilot session.
|
|
RevokeAutopilotSession(context.Context, *RevokeAutopilotSessionRequest) (*RevokeAutopilotSessionResponse, error)
|
|
mustEmbedUnimplementedAutopilotServer()
|
|
}
|
|
|
|
// UnimplementedAutopilotServer must be embedded to have forward compatible implementations.
|
|
type UnimplementedAutopilotServer struct {
|
|
}
|
|
|
|
func (UnimplementedAutopilotServer) ListAutopilotFeatures(context.Context, *ListAutopilotFeaturesRequest) (*ListAutopilotFeaturesResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method ListAutopilotFeatures not implemented")
|
|
}
|
|
func (UnimplementedAutopilotServer) AddAutopilotSession(context.Context, *AddAutopilotSessionRequest) (*AddAutopilotSessionResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method AddAutopilotSession not implemented")
|
|
}
|
|
func (UnimplementedAutopilotServer) ListAutopilotSessions(context.Context, *ListAutopilotSessionsRequest) (*ListAutopilotSessionsResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method ListAutopilotSessions not implemented")
|
|
}
|
|
func (UnimplementedAutopilotServer) RevokeAutopilotSession(context.Context, *RevokeAutopilotSessionRequest) (*RevokeAutopilotSessionResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method RevokeAutopilotSession not implemented")
|
|
}
|
|
func (UnimplementedAutopilotServer) mustEmbedUnimplementedAutopilotServer() {}
|
|
|
|
// UnsafeAutopilotServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to AutopilotServer will
|
|
// result in compilation errors.
|
|
type UnsafeAutopilotServer interface {
|
|
mustEmbedUnimplementedAutopilotServer()
|
|
}
|
|
|
|
func RegisterAutopilotServer(s grpc.ServiceRegistrar, srv AutopilotServer) {
|
|
s.RegisterService(&Autopilot_ServiceDesc, srv)
|
|
}
|
|
|
|
func _Autopilot_ListAutopilotFeatures_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ListAutopilotFeaturesRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AutopilotServer).ListAutopilotFeatures(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/litrpc.Autopilot/ListAutopilotFeatures",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AutopilotServer).ListAutopilotFeatures(ctx, req.(*ListAutopilotFeaturesRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Autopilot_AddAutopilotSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(AddAutopilotSessionRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AutopilotServer).AddAutopilotSession(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/litrpc.Autopilot/AddAutopilotSession",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AutopilotServer).AddAutopilotSession(ctx, req.(*AddAutopilotSessionRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Autopilot_ListAutopilotSessions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ListAutopilotSessionsRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AutopilotServer).ListAutopilotSessions(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/litrpc.Autopilot/ListAutopilotSessions",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AutopilotServer).ListAutopilotSessions(ctx, req.(*ListAutopilotSessionsRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Autopilot_RevokeAutopilotSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(RevokeAutopilotSessionRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AutopilotServer).RevokeAutopilotSession(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/litrpc.Autopilot/RevokeAutopilotSession",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AutopilotServer).RevokeAutopilotSession(ctx, req.(*RevokeAutopilotSessionRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// Autopilot_ServiceDesc is the grpc.ServiceDesc for Autopilot service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var Autopilot_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "litrpc.Autopilot",
|
|
HandlerType: (*AutopilotServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "ListAutopilotFeatures",
|
|
Handler: _Autopilot_ListAutopilotFeatures_Handler,
|
|
},
|
|
{
|
|
MethodName: "AddAutopilotSession",
|
|
Handler: _Autopilot_AddAutopilotSession_Handler,
|
|
},
|
|
{
|
|
MethodName: "ListAutopilotSessions",
|
|
Handler: _Autopilot_ListAutopilotSessions_Handler,
|
|
},
|
|
{
|
|
MethodName: "RevokeAutopilotSession",
|
|
Handler: _Autopilot_RevokeAutopilotSession_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "lit-autopilot.proto",
|
|
}
|