configschema

package
v1.17.4 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2026 License: BSD-3-Clause Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MarshalJSON

func MarshalJSON(doc *SchemaDocument) ([]byte, error)

MarshalJSON returns a stable, indented JSON encoding of the schema document.

Types

type ConfigEntry

type ConfigEntry struct {
	Env          string   `json:"env"`
	Field        string   `json:"field"`
	Type         string   `json:"type"`
	DefaultValue string   `json:"defaultValue,omitempty"`
	Description  string   `json:"description,omitempty"`
	Options      []string `json:"options,omitempty"`
	SupportsFile bool     `json:"supportsFile,omitempty"`
	Conditional  bool     `json:"conditional,omitempty"`
	BuildTags    []string `json:"buildTags,omitempty"`
	Source       string   `json:"source"`
	SourceFile   string   `json:"sourceFile"`
	SourceSymbol string   `json:"sourceSymbol"`
}

ConfigEntry describes an environment-backed runtime config value.

type SchemaDocument

type SchemaDocument struct {
	SchemaVersion       int                    `json:"schemaVersion"`
	Notes               []string               `json:"notes,omitempty"`
	EnvConfig           []ConfigEntry          `json:"envConfig"`
	SettingEnvOverrides []SettingOverrideEntry `json:"settingEnvOverrides"`
}

SchemaDocument is the canonical JSON artifact consumed by the docs site.

func GenerateWithSourceRoot

func GenerateWithSourceRoot(sourceRoot string) (*SchemaDocument, error)

GenerateWithSourceRoot builds the canonical schema document for config and settings docs.

type SettingOverrideEntry

type SettingOverrideEntry struct {
	Env          string `json:"env"`
	SettingKey   string `json:"settingKey"`
	Description  string `json:"description,omitempty"`
	DefaultValue string `json:"defaultValue,omitempty"`
	Type         string `json:"type"`
	Sensitive    bool   `json:"sensitive"`
	Deprecated   bool   `json:"deprecated"`
	Category     string `json:"category,omitempty"`
	Public       bool   `json:"public"`
	Requires     string `json:"requires,omitempty"`
	Note         string `json:"note,omitempty"`
	Source       string `json:"source"`
	SourceFile   string `json:"sourceFile"`
	SourceSymbol string `json:"sourceSymbol"`
}

SettingOverrideEntry describes a database-backed setting that can be controlled by env vars.

Jump to

Keyboard shortcuts

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