mirror of
https://github.com/lightninglabs/lightning-terminal.git
synced 2026-08-13 12:33:36 +02:00
litrpc: add cli directives to Autopilot service
This commit is contained in:
parent
de3e492d41
commit
6c3fa5a6ad
3 changed files with 44 additions and 0 deletions
|
|
@ -408,6 +408,7 @@ type RevokeAutopilotSessionRequest struct {
|
|||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// The local static public key of the Autopilot session to be revoked.
|
||||
LocalPublicKey []byte `protobuf:"bytes,1,opt,name=local_public_key,json=localPublicKey,proto3" json:"local_public_key,omitempty"`
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,15 +7,31 @@ package litrpc;
|
|||
option go_package = "github.com/lightninglabs/lightning-terminal/litrpc";
|
||||
|
||||
service Autopilot {
|
||||
/* 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.
|
||||
*/
|
||||
rpc ListAutopilotFeatures (ListAutopilotFeaturesRequest)
|
||||
returns (ListAutopilotFeaturesResponse);
|
||||
|
||||
/* litcli: `autopilot add`
|
||||
AddAutopilotSession creates a new LNC session and attempts to register it
|
||||
with the Autopilot server.
|
||||
*/
|
||||
rpc AddAutopilotSession (AddAutopilotSessionRequest)
|
||||
returns (AddAutopilotSessionResponse);
|
||||
|
||||
/* litcli: `autopilot list`
|
||||
ListAutopilotSessions lists all the sessions that are of type
|
||||
TypeAutopilot.
|
||||
*/
|
||||
rpc ListAutopilotSessions (ListAutopilotSessionsRequest)
|
||||
returns (ListAutopilotSessionsResponse);
|
||||
|
||||
/* litcli: `autopilot revoke`
|
||||
RevokeAutopilotSession revokes an Autopilot session.
|
||||
*/
|
||||
rpc RevokeAutopilotSession (RevokeAutopilotSessionRequest)
|
||||
returns (RevokeAutopilotSessionResponse);
|
||||
}
|
||||
|
|
@ -101,6 +117,9 @@ message ListAutopilotFeaturesResponse {
|
|||
}
|
||||
|
||||
message RevokeAutopilotSessionRequest {
|
||||
/*
|
||||
The local static public key of the Autopilot session to be revoked.
|
||||
*/
|
||||
bytes local_public_key = 1;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -18,9 +18,21 @@ const _ = grpc.SupportPackageIsVersion7
|
|||
//
|
||||
// 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)
|
||||
}
|
||||
|
||||
|
|
@ -72,9 +84,21 @@ func (c *autopilotClient) RevokeAutopilotSession(ctx context.Context, in *Revoke
|
|||
// 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()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue