docs

package
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 20, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateHTML

func GenerateHTML(doc *APIDoc) string

GenerateHTML produces a self-contained HTML documentation page from an APIDoc.

func GenerateMarkdown

func GenerateMarkdown(doc *APIDoc) string

GenerateMarkdown produces Markdown documentation from an APIDoc.

Types

type APIDoc

type APIDoc struct {
	Title  string
	Routes []RouteDoc
	Types  []TypeDoc
}

APIDoc holds all documentation data for a module.

func ExtractDocs

func ExtractDocs(module *ast.Module, title string) *APIDoc

ExtractDocs extracts documentation data from a parsed module.

type FieldDoc

type FieldDoc struct {
	Name     string
	Type     string
	Required bool
}

FieldDoc documents a single field.

type QueryParamDoc

type QueryParamDoc struct {
	Name     string
	Type     string
	Required bool
}

QueryParamDoc documents a query parameter.

type RouteDoc

type RouteDoc struct {
	Method      string
	Path        string
	InputType   string
	ReturnType  string
	PathParams  []string
	QueryParams []QueryParamDoc
	HasAuth     bool
	AuthType    string
	RateLimit   string
}

RouteDoc holds documentation data for a single route.

type TypeDoc

type TypeDoc struct {
	Name   string
	Fields []FieldDoc
}

TypeDoc holds documentation data for a type definition.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL