diff --git a/api/api_common.go b/api/api_common.go index 6d47e35f7..aa63e9815 100644 --- a/api/api_common.go +++ b/api/api_common.go @@ -13,11 +13,13 @@ import ( ) type Common interface { - // Auth + + // MethodGroup: Auth + AuthVerify(ctx context.Context, token string) ([]auth.Permission, error) AuthNew(ctx context.Context, perms []auth.Permission) ([]byte, error) - // network + // MethodGroup: Net NetConnectedness(context.Context, peer.ID) (network.Connectedness, error) NetPeers(context.Context) ([]peer.AddrInfo, error) @@ -27,6 +29,8 @@ type Common interface { NetFindPeer(context.Context, peer.ID) (peer.AddrInfo, error) NetPubsubScores(context.Context) ([]PubsubScore, error) + // MethodGroup: Common + // ID returns peerID of libp2p node backing this API ID(context.Context) (peer.ID, error) diff --git a/api/docgen/docgen.go b/api/docgen/docgen.go index 39892c820..f876e280e 100644 --- a/api/docgen/docgen.go +++ b/api/docgen/docgen.go @@ -325,6 +325,15 @@ func main() { return groupslice[i].GroupName < groupslice[j].GroupName }) + fmt.Printf("# Groups\n") + + for _, g := range groupslice { + fmt.Printf("* [%s](#%s)\n", g.GroupName, g.GroupName) + for _, method := range g.Methods { + fmt.Printf(" * [%s](#%s)\n", method.Name, method.Name) + } + } + for _, g := range groupslice { g := g fmt.Printf("## %s\n", g.GroupName)