docs

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package docs provides documentation generation utilities.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIDoc

type APIDoc struct {
	Title       string
	Description string
	Version     string
	BasePath    string
	Endpoints   []Endpoint
}

APIDoc represents API documentation.

func NewAPIDoc

func NewAPIDoc(title, description, version, basePath string) *APIDoc

NewAPIDoc creates a new API documentation.

func (*APIDoc) AddEndpoint

func (a *APIDoc) AddEndpoint(ep Endpoint)

AddEndpoint adds an endpoint.

func (*APIDoc) GenerateOpenAPI

func (a *APIDoc) GenerateOpenAPI() string

GenerateOpenAPI generates OpenAPI 3.0 specification.

func (*APIDoc) MarkdownDocs

func (a *APIDoc) MarkdownDocs() string

MarkdownDocs generates Markdown documentation.

type ArchitectureDoc

type ArchitectureDoc struct {
	Title       string
	LastUpdated time.Time
	Sections    []Section
}

ArchitectureDoc represents architecture documentation.

func ArchitectureOverview

func ArchitectureOverview() *ArchitectureDoc

ArchitectureOverview returns the main architecture document.

func NewArchitectureDoc

func NewArchitectureDoc(title string) *ArchitectureDoc

NewArchitectureDoc creates architecture documentation.

func (*ArchitectureDoc) AddSection

func (a *ArchitectureDoc) AddSection(title string, level int, content string)

AddSection adds a section.

func (*ArchitectureDoc) GenerateMarkdown

func (a *ArchitectureDoc) GenerateMarkdown() string

GenerateMarkdown creates Markdown documentation.

type Endpoint

type Endpoint struct {
	Path        string
	Method      string
	Summary     string
	Description string
	Parameters  []Parameter
	RequestBody interface{}
	Response    map[string]interface{}
	Security    []string
}

Endpoint represents an API endpoint.

type Parameter

type Parameter struct {
	Name        string
	In          string // path, query, header, body
	Type        string
	Required    bool
	Description string
}

Parameter represents an API parameter.

type Section

type Section struct {
	Title    string
	Level    int
	Content  string
	Children []Section
}

Section represents a documentation section.

Jump to

Keyboard shortcuts

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