docgen

package
v0.0.0-...-ecdd364 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2022 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(t *testing.T, p interface{}, outputFile string)

Generate will generate the README.md file for the plugin.

func StripNewline

func StripNewline(s string) string

StripNewline strips newlines from the end of a string.

Types

type App

type App struct {
	Handler http.Handler
	Mux     *routerecorder.Plugin
}

App contains all the plugins.

func LighweightAppSetup

func LighweightAppSetup(appName string, p ambient.Plugin, trust bool) *App

LighweightAppSetup setups up a lighweight Ambient system.

type Doc

type Doc struct {
	PackageName        string
	PackagePath        string
	PackageDescription string
	PackageVersion     string
	GrantRequests      []ambient.GrantRequest
	Settings           []ambient.Setting
	FuncMap            func(r *http.Request) template.FuncMap
	Assets             []ambient.Asset
	EmbeddedFS         ambient.FileSystemReader
	Routes             []routerecorder.Route
	Middleware         []func(next http.Handler) http.Handler
	Example            string

	Logger         bool
	StorageSystem  bool
	Router         bool
	TemplateEngine bool
	SessionManager bool
}

Doc represents the variables passed to a doc template.

func (*Doc) Output

func (d *Doc) Output(filename string)

Output will write the plugin doc using the template.

Jump to

Keyboard shortcuts

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