docgen

package
v0.38.0 Latest Latest
Warning

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

Go to latest
Published: May 19, 2026 License: Apache-2.0 Imports: 14 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPrefixedValue

func GetPrefixedValue(origin, expression string) string

Types

type Doc

type Doc struct {
	Item        DocItem
	DisplayName string
	Content     string
	Version     string
	Url         string
	Desc        string
	Status      string

	RootNode *ast.File
	Logger   logr.Logger
}

func GetDocumentParser

func GetDocumentParser(source DocItem, log logr.Logger) *Doc

func NewDoc

func NewDoc(item DocItem, log logr.Logger) *Doc

func (*Doc) Append

func (d *Doc) Append(line string)

func (*Doc) Generate

func (d *Doc) Generate() error

type DocIndex

type DocIndex struct {
	Path string
}

type DocItem

type DocItem struct {
	Name                         string
	SourcePath                   string
	DestPath                     string
	Category                     string
	DefaultValueFromTagExtractor func(string) string
}

type DocItems

type DocItems []DocItem

type FieldSorter added in v0.33.0

type FieldSorter []*ast.Field

func (FieldSorter) Len added in v0.33.0

func (s FieldSorter) Len() int

func (FieldSorter) Less added in v0.33.0

func (s FieldSorter) Less(i, j int) bool

func (FieldSorter) Swap added in v0.33.0

func (s FieldSorter) Swap(i, j int)

type SourceDir

type SourceDir struct {
	Path     string
	DestPath string
}

type SourceLister

type SourceLister struct {
	Logger                       logr.Logger
	Sources                      map[string]SourceDir
	IgnoredSources               []string
	IncludeSources               []string
	DefaultValueFromTagExtractor func(string) string
	Index                        *Doc
	DocGeneratedHook             func(doc *Doc) error
	Header                       string
	Footer                       string
}

func NewSourceLister

func NewSourceLister(sources map[string]SourceDir, logger logr.Logger) *SourceLister

func (*SourceLister) Generate

func (lister *SourceLister) Generate() error

func (*SourceLister) ListSources

func (sl *SourceLister) ListSources() ([]DocItem, error)

Jump to

Keyboard shortcuts

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