docs

package
v1.7.9 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2022 License: AGPL-3.0 Imports: 33 Imported by: 0

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
}{
	{"Flow Specification", "index.md", nil},
	{"Flows", "flows.md", []string{"action", "router", "wait"}},
	{"Expressions", "expressions.md", []string{"type", "operator", "function"}},
	{"Context", "context.md", []string{"context"}},
	{"Routing", "routing.md", []string{"test"}},
	{"Sessions", "sessions.md", []string{"event", "trigger", "resume"}},
	{"Assets", "assets.md", []string{"asset"}},
}

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