configref

package
v0.1.112 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package configref builds docs/configuration.md, the reference of every setting a Līdza app reads, from the framework's source: the env tags of the packs' Config structs, the Env constants, and the settings read by name, each with its doc comment. `go generate ./pkg/configref` writes it; the package test fails while the file is stale or a setting read by name is undocumented.

Index

Constants

View Source
const AdminFile = "packs/admin/appsettings_gen.go"

AdminFile is the admin pack's table of the app settings, relative to the repository root: the Settings page edits each one.

View Source
const File = "docs/configuration.md"

File is the reference, relative to the repository root.

Variables

This section is empty.

Functions

func Render

func Render(settings []Setting) string

Render is the Markdown reference.

func RenderAdmin added in v0.1.112

func RenderAdmin(settings []Setting) string

RenderAdmin is the admin pack's table of app settings (env.KindApp), as Go: name, area, default, description.

Types

type Setting

type Setting struct {
	Name     string
	Default  string
	Required bool
	Doc      string
	Area     string // "packs/auth", "core"
	// Kind is env.KindInfra (the deployment's environment) or
	// env.KindApp (stored in the app).
	Kind string
}

Setting is one environment variable.

func Collect

func Collect(root string) ([]Setting, error)

Collect reads the settings under root.

Directories

Path Synopsis
Command gen writes docs/configuration.md from the framework's source (go generate ./pkg/configref).
Command gen writes docs/configuration.md from the framework's source (go generate ./pkg/configref).

Jump to

Keyboard shortcuts

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