lnrpc: fix watchtowerrpc doc tags to enable lncli api doc generation

This commit is contained in:
Keagan McClelland 2023-11-14 17:56:37 -08:00
parent dae80f5db7
commit 545b8913c7
3 changed files with 22 additions and 4 deletions

View file

@ -4,10 +4,28 @@ package watchtowerrpc;
option go_package = "github.com/lightningnetwork/lnd/lnrpc/watchtowerrpc"; option go_package = "github.com/lightningnetwork/lnd/lnrpc/watchtowerrpc";
/*
* Comments in this file will be directly parsed into the API
* Documentation as descriptions of the associated method, message, or field.
* These descriptions should go right above the definition of the object, and
* can be in either block or // comment format.
*
* An RPC method can be matched to an lncli command by placing a line in the
* beginning of the description in exactly the following format:
* lncli: `methodname`
*
* Failure to specify the exact name of the command will cause documentation
* generation to fail.
*
* More information on how exactly the gRPC documentation is generated from
* this proto file can be found here:
* https://github.com/lightninglabs/lightning-api
*/
// Watchtower is a service that grants access to the watchtower server // Watchtower is a service that grants access to the watchtower server
// functionality of the daemon. // functionality of the daemon.
service Watchtower { service Watchtower {
/* lncli: tower info /* lncli: `tower info`
GetInfo returns general information concerning the companion watchtower GetInfo returns general information concerning the companion watchtower
including its public key and URIs where the server is currently including its public key and URIs where the server is currently
listening for clients. listening for clients.

View file

@ -18,7 +18,7 @@
"paths": { "paths": {
"/v2/watchtower/server": { "/v2/watchtower/server": {
"get": { "get": {
"summary": "lncli: tower info\nGetInfo returns general information concerning the companion watchtower\nincluding its public key and URIs where the server is currently\nlistening for clients.", "summary": "lncli: `tower info`\nGetInfo returns general information concerning the companion watchtower\nincluding its public key and URIs where the server is currently\nlistening for clients.",
"operationId": "Watchtower_GetInfo", "operationId": "Watchtower_GetInfo",
"responses": { "responses": {
"200": { "200": {

View file

@ -18,7 +18,7 @@ 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. // 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 WatchtowerClient interface { type WatchtowerClient interface {
// lncli: tower info // lncli: `tower info`
// GetInfo returns general information concerning the companion watchtower // GetInfo returns general information concerning the companion watchtower
// including its public key and URIs where the server is currently // including its public key and URIs where the server is currently
// listening for clients. // listening for clients.
@ -46,7 +46,7 @@ func (c *watchtowerClient) GetInfo(ctx context.Context, in *GetInfoRequest, opts
// All implementations must embed UnimplementedWatchtowerServer // All implementations must embed UnimplementedWatchtowerServer
// for forward compatibility // for forward compatibility
type WatchtowerServer interface { type WatchtowerServer interface {
// lncli: tower info // lncli: `tower info`
// GetInfo returns general information concerning the companion watchtower // GetInfo returns general information concerning the companion watchtower
// including its public key and URIs where the server is currently // including its public key and URIs where the server is currently
// listening for clients. // listening for clients.