lnrpc: add top level command doc tags to enable lncli api doc generation

This commit is contained in:
Keagan McClelland 2023-11-14 17:52:33 -08:00
parent ba4438b923
commit dae80f5db7
7 changed files with 17 additions and 9 deletions

View file

@ -2480,7 +2480,7 @@ var verifyChanBackupCommand = cli.Command{
* A packed multi-channel SCB, which couples several individual * A packed multi-channel SCB, which couples several individual
static channel backups in single blob. static channel backups in single blob.
* A file path which points to a packed single-channel backup within a * A file path which points to a packed single-channel backup within a
file, using the same format that lnd does in its channel.backup file. file, using the same format that lnd does in its channel.backup file.

View file

@ -341,13 +341,13 @@ service Lightning {
*/ */
rpc ListPayments (ListPaymentsRequest) returns (ListPaymentsResponse); rpc ListPayments (ListPaymentsRequest) returns (ListPaymentsResponse);
/* /* lncli: `deletepayments`
DeletePayment deletes an outgoing payment from DB. Note that it will not DeletePayment deletes an outgoing payment from DB. Note that it will not
attempt to delete an In-Flight payment, since that would be unsafe. attempt to delete an In-Flight payment, since that would be unsafe.
*/ */
rpc DeletePayment (DeletePaymentRequest) returns (DeletePaymentResponse); rpc DeletePayment (DeletePaymentRequest) returns (DeletePaymentResponse);
/* /* lncli: `deletepayments --all`
DeleteAllPayments deletes all outgoing payments from DB. Note that it will DeleteAllPayments deletes all outgoing payments from DB. Note that it will
not attempt to delete In-Flight payments, since that would be unsafe. not attempt to delete In-Flight payments, since that would be unsafe.
*/ */
@ -479,7 +479,7 @@ service Lightning {
rpc ExportAllChannelBackups (ChanBackupExportRequest) rpc ExportAllChannelBackups (ChanBackupExportRequest)
returns (ChanBackupSnapshot); returns (ChanBackupSnapshot);
/* /* lncli: `verifychanbackup`
VerifyChanBackup allows a caller to verify the integrity of a channel backup VerifyChanBackup allows a caller to verify the integrity of a channel backup
snapshot. This method will accept either a packed Single or a packed Multi. snapshot. This method will accept either a packed Single or a packed Multi.
Specifying both will result in an error. Specifying both will result in an error.

View file

@ -383,7 +383,7 @@
}, },
"/v1/channels/backup/verify": { "/v1/channels/backup/verify": {
"post": { "post": {
"summary": "VerifyChanBackup allows a caller to verify the integrity of a channel backup\nsnapshot. This method will accept either a packed Single or a packed Multi.\nSpecifying both will result in an error.", "summary": "lncli: `verifychanbackup`\nVerifyChanBackup allows a caller to verify the integrity of a channel backup\nsnapshot. This method will accept either a packed Single or a packed Multi.\nSpecifying both will result in an error.",
"operationId": "Lightning_VerifyChanBackup", "operationId": "Lightning_VerifyChanBackup",
"responses": { "responses": {
"200": { "200": {
@ -2075,7 +2075,7 @@
}, },
"/v1/payment": { "/v1/payment": {
"delete": { "delete": {
"summary": "DeletePayment deletes an outgoing payment from DB. Note that it will not\nattempt to delete an In-Flight payment, since that would be unsafe.", "summary": "lncli: `deletepayments`\nDeletePayment deletes an outgoing payment from DB. Note that it will not\nattempt to delete an In-Flight payment, since that would be unsafe.",
"operationId": "Lightning_DeletePayment", "operationId": "Lightning_DeletePayment",
"responses": { "responses": {
"200": { "200": {
@ -2191,7 +2191,7 @@
] ]
}, },
"delete": { "delete": {
"summary": "DeleteAllPayments deletes all outgoing payments from DB. Note that it will\nnot attempt to delete In-Flight payments, since that would be unsafe.", "summary": "lncli: `deletepayments --all`\nDeleteAllPayments deletes all outgoing payments from DB. Note that it will\nnot attempt to delete In-Flight payments, since that would be unsafe.",
"operationId": "Lightning_DeleteAllPayments", "operationId": "Lightning_DeleteAllPayments",
"responses": { "responses": {
"200": { "200": {

View file

@ -241,9 +241,11 @@ type LightningClient interface {
// lncli: `listpayments` // lncli: `listpayments`
// ListPayments returns a list of all outgoing payments. // ListPayments returns a list of all outgoing payments.
ListPayments(ctx context.Context, in *ListPaymentsRequest, opts ...grpc.CallOption) (*ListPaymentsResponse, error) ListPayments(ctx context.Context, in *ListPaymentsRequest, opts ...grpc.CallOption) (*ListPaymentsResponse, error)
// lncli: `deletepayments`
// DeletePayment deletes an outgoing payment from DB. Note that it will not // DeletePayment deletes an outgoing payment from DB. Note that it will not
// attempt to delete an In-Flight payment, since that would be unsafe. // attempt to delete an In-Flight payment, since that would be unsafe.
DeletePayment(ctx context.Context, in *DeletePaymentRequest, opts ...grpc.CallOption) (*DeletePaymentResponse, error) DeletePayment(ctx context.Context, in *DeletePaymentRequest, opts ...grpc.CallOption) (*DeletePaymentResponse, error)
// lncli: `deletepayments --all`
// DeleteAllPayments deletes all outgoing payments from DB. Note that it will // DeleteAllPayments deletes all outgoing payments from DB. Note that it will
// not attempt to delete In-Flight payments, since that would be unsafe. // not attempt to delete In-Flight payments, since that would be unsafe.
DeleteAllPayments(ctx context.Context, in *DeleteAllPaymentsRequest, opts ...grpc.CallOption) (*DeleteAllPaymentsResponse, error) DeleteAllPayments(ctx context.Context, in *DeleteAllPaymentsRequest, opts ...grpc.CallOption) (*DeleteAllPaymentsResponse, error)
@ -337,6 +339,7 @@ type LightningClient interface {
// as well, which contains a single encrypted blob containing the backups of // as well, which contains a single encrypted blob containing the backups of
// each channel. // each channel.
ExportAllChannelBackups(ctx context.Context, in *ChanBackupExportRequest, opts ...grpc.CallOption) (*ChanBackupSnapshot, error) ExportAllChannelBackups(ctx context.Context, in *ChanBackupExportRequest, opts ...grpc.CallOption) (*ChanBackupSnapshot, error)
// lncli: `verifychanbackup`
// VerifyChanBackup allows a caller to verify the integrity of a channel backup // VerifyChanBackup allows a caller to verify the integrity of a channel backup
// snapshot. This method will accept either a packed Single or a packed Multi. // snapshot. This method will accept either a packed Single or a packed Multi.
// Specifying both will result in an error. // Specifying both will result in an error.
@ -1545,9 +1548,11 @@ type LightningServer interface {
// lncli: `listpayments` // lncli: `listpayments`
// ListPayments returns a list of all outgoing payments. // ListPayments returns a list of all outgoing payments.
ListPayments(context.Context, *ListPaymentsRequest) (*ListPaymentsResponse, error) ListPayments(context.Context, *ListPaymentsRequest) (*ListPaymentsResponse, error)
// lncli: `deletepayments`
// DeletePayment deletes an outgoing payment from DB. Note that it will not // DeletePayment deletes an outgoing payment from DB. Note that it will not
// attempt to delete an In-Flight payment, since that would be unsafe. // attempt to delete an In-Flight payment, since that would be unsafe.
DeletePayment(context.Context, *DeletePaymentRequest) (*DeletePaymentResponse, error) DeletePayment(context.Context, *DeletePaymentRequest) (*DeletePaymentResponse, error)
// lncli: `deletepayments --all`
// DeleteAllPayments deletes all outgoing payments from DB. Note that it will // DeleteAllPayments deletes all outgoing payments from DB. Note that it will
// not attempt to delete In-Flight payments, since that would be unsafe. // not attempt to delete In-Flight payments, since that would be unsafe.
DeleteAllPayments(context.Context, *DeleteAllPaymentsRequest) (*DeleteAllPaymentsResponse, error) DeleteAllPayments(context.Context, *DeleteAllPaymentsRequest) (*DeleteAllPaymentsResponse, error)
@ -1641,6 +1646,7 @@ type LightningServer interface {
// as well, which contains a single encrypted blob containing the backups of // as well, which contains a single encrypted blob containing the backups of
// each channel. // each channel.
ExportAllChannelBackups(context.Context, *ChanBackupExportRequest) (*ChanBackupSnapshot, error) ExportAllChannelBackups(context.Context, *ChanBackupExportRequest) (*ChanBackupSnapshot, error)
// lncli: `verifychanbackup`
// VerifyChanBackup allows a caller to verify the integrity of a channel backup // VerifyChanBackup allows a caller to verify the integrity of a channel backup
// snapshot. This method will accept either a packed Single or a packed Multi. // snapshot. This method will accept either a packed Single or a packed Multi.
// Specifying both will result in an error. // Specifying both will result in an error.

View file

@ -34,7 +34,7 @@ service Router {
*/ */
rpc SendPaymentV2 (SendPaymentRequest) returns (stream lnrpc.Payment); rpc SendPaymentV2 (SendPaymentRequest) returns (stream lnrpc.Payment);
/* /* lncli: `trackpayment`
TrackPaymentV2 returns an update stream for the payment identified by the TrackPaymentV2 returns an update stream for the payment identified by the
payment hash. payment hash.
*/ */

View file

@ -434,7 +434,7 @@
}, },
"/v2/router/track/{payment_hash}": { "/v2/router/track/{payment_hash}": {
"get": { "get": {
"summary": "TrackPaymentV2 returns an update stream for the payment identified by the\npayment hash.", "summary": "lncli: `trackpayment`\nTrackPaymentV2 returns an update stream for the payment identified by the\npayment hash.",
"operationId": "Router_TrackPaymentV2", "operationId": "Router_TrackPaymentV2",
"responses": { "responses": {
"200": { "200": {

View file

@ -23,6 +23,7 @@ type RouterClient interface {
// PaymentRequest to the final destination. The call returns a stream of // PaymentRequest to the final destination. The call returns a stream of
// payment updates. // payment updates.
SendPaymentV2(ctx context.Context, in *SendPaymentRequest, opts ...grpc.CallOption) (Router_SendPaymentV2Client, error) SendPaymentV2(ctx context.Context, in *SendPaymentRequest, opts ...grpc.CallOption) (Router_SendPaymentV2Client, error)
// lncli: `trackpayment`
// TrackPaymentV2 returns an update stream for the payment identified by the // TrackPaymentV2 returns an update stream for the payment identified by the
// payment hash. // payment hash.
TrackPaymentV2(ctx context.Context, in *TrackPaymentRequest, opts ...grpc.CallOption) (Router_TrackPaymentV2Client, error) TrackPaymentV2(ctx context.Context, in *TrackPaymentRequest, opts ...grpc.CallOption) (Router_TrackPaymentV2Client, error)
@ -451,6 +452,7 @@ type RouterServer interface {
// PaymentRequest to the final destination. The call returns a stream of // PaymentRequest to the final destination. The call returns a stream of
// payment updates. // payment updates.
SendPaymentV2(*SendPaymentRequest, Router_SendPaymentV2Server) error SendPaymentV2(*SendPaymentRequest, Router_SendPaymentV2Server) error
// lncli: `trackpayment`
// TrackPaymentV2 returns an update stream for the payment identified by the // TrackPaymentV2 returns an update stream for the payment identified by the
// payment hash. // payment hash.
TrackPaymentV2(*TrackPaymentRequest, Router_TrackPaymentV2Server) error TrackPaymentV2(*TrackPaymentRequest, Router_TrackPaymentV2Server) error