lnrpc: add devrpc doc tags to enable lncli api doc generation

This commit is contained in:
Keagan McClelland 2023-11-14 17:31:45 -08:00
parent 4eca04e6a0
commit ba4438b923
3 changed files with 22 additions and 2 deletions

View File

@ -6,8 +6,26 @@ package devrpc;
option go_package = "github.com/lightningnetwork/lnd/lnrpc/devrpc";
/*
* 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
*/
service Dev {
/*
/* lncli: `importgraph`
ImportGraph imports a ChannelGraph into the graph database. Should only be
used for development.
*/

View File

@ -18,7 +18,7 @@
"paths": {
"/v2/dev/importgraph": {
"post": {
"summary": "ImportGraph imports a ChannelGraph into the graph database. Should only be\nused for development.",
"summary": "lncli: `importgraph`\nImportGraph imports a ChannelGraph into the graph database. Should only be\nused for development.",
"operationId": "Dev_ImportGraph",
"responses": {
"200": {

View File

@ -19,6 +19,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.
type DevClient interface {
// lncli: `importgraph`
// ImportGraph imports a ChannelGraph into the graph database. Should only be
// used for development.
ImportGraph(ctx context.Context, in *lnrpc.ChannelGraph, opts ...grpc.CallOption) (*ImportGraphResponse, error)
@ -45,6 +46,7 @@ func (c *devClient) ImportGraph(ctx context.Context, in *lnrpc.ChannelGraph, opt
// All implementations must embed UnimplementedDevServer
// for forward compatibility
type DevServer interface {
// lncli: `importgraph`
// ImportGraph imports a ChannelGraph into the graph database. Should only be
// used for development.
ImportGraph(context.Context, *lnrpc.ChannelGraph) (*ImportGraphResponse, error)