docgen

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2020 License: Apache-2.0 Imports: 15 Imported by: 5

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 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