docs

package
v0.221.0 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2024 License: AGPL-3.0, AGPL-3.0-or-later Imports: 33 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Resources = []string{"styles.css"}
View Source
var Templates = []struct {
	Title         string
	Path          string
	ContainsTypes []string // used for resolving links
	TOC           bool
}{
	{"Flow Specification", "index.md", []string{"version"}, false},
	{"Flows", "flows.md", []string{"action", "router", "wait"}, true},
	{"Expressions", "expressions.md", []string{"type", "operator", "function"}, true},
	{"Context", "context.md", []string{"context"}, true},
	{"Routing", "routing.md", []string{"test"}, true},
	{"Sessions", "sessions.md", []string{"event", "trigger", "resume"}, true},
	{"Assets", "assets.md", []string{"asset"}, true},
}

Functions

func FindAllTaggedItems

func FindAllTaggedItems(baseDir string) (map[string][]*TaggedItem, error)

FindAllTaggedItems finds all tagged docstrings in go files

func Generate

func Generate(baseDir, outputDir, localeDir string) error

Generate generates all documentation outputs

func RegisterGenerator

func RegisterGenerator(g Generator)

RegisterGenerator registers a documentation generator

Types

type ContextFunc

type ContextFunc func(map[string][]*TaggedItem, flows.Session, flows.Session) (map[string]string, error)

ContextFunc is a function which produces values to put the template context

type Generator

type Generator interface {
	Name() string

	// Generate does the actual generation in the given language
	Generate(baseDir, outputDir string, items map[string][]*TaggedItem, gettext func(string) string) error
}

Generator generates a documentation output

type TaggedItem

type TaggedItem struct {
	// contains filtered or unexported fields
}

TaggedItem is any item that is documented with a @tag to indicate it will be used by docgen

Jump to

Keyboard shortcuts

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