Versions in this module Expand all Collapse all v0 v0.0.2 Oct 4, 2026 v0.0.1 Oct 3, 2026 Changes in this version + func Format(d *Document) string + func FormatExpr(e Expr) string + func ResolveField[T any](ctx context.Context, r *Registry, e Expr, path string, sensitive bool) (T, error) + func Resolve[T any](ctx context.Context, r *Registry, expr Expr) (T, error) + type Blank struct + type Call struct + Args []Expr + Name string + type Comment struct + Kind CommentKind + Text string + type CommentKind uint8 + const DocumentationComment + const UserComment + type DisplayPolicy map[string]func([]Expr, DisplayPolicy) bool + func StandardDisplayPolicy() DisplayPolicy + func (p DisplayPolicy) SafeSource(e Expr) bool + type Document struct + HasVersion bool + Items []Item + Sections []*Section + Version int + func Parse(r io.Reader) (*Document, error) + func (d *Document) AddSection(s *Section) + func (d *Document) Clone() *Document + func (d *Document) Section(name string) *Section + func (d *Document) Value(section, key string) Expr + type Entry struct + Defaulted bool + Key string + Value Expr + type Expr interface + func BindingValue(d *Document, section, key string, fallback Expr, env string, nonempty bool, ...) Expr + func CloneExpr(e Expr) Expr + func ParseExpr(input string) (Expr, error) + type Field struct + Default Expr + Deprecated bool + Documentation []string + Environment string + EnvironmentNonEmpty bool + Examples []Expr + GoName string + GoType string + InputOnly bool + Key string + Policy ResolutionPolicy + Required bool + RuntimeOnly bool + Sensitive bool + type Item interface + type Literal struct + Value string + type LookupEnv func(string) (string, bool) + type Migration func(*Document) error + type Migrations struct + func NewMigrations() *Migrations + func (m *Migrations) Apply(d *Document, target int) error + func (m *Migrations) Register(from int, step Migration) error + type Provider interface + Resolve func(context.Context) (T, error) + func Deferred[T any](registry *Registry, expr Expr) Provider[T] + func FieldProvider[T any](r *Registry, e Expr, path string, sensitive bool) Provider[T] + type ProviderFunc func(context.Context) (T, error) + func (f ProviderFunc[T]) Resolve(ctx context.Context) (T, error) + type Raw struct + Text string + type Registry struct + func NewRegistry() *Registry + func NewStandardRegistry() (*Registry, error) + func (r *Registry) Register(name string, result any, resolver Resolver) error + func (r *Registry) ResolveAs(ctx context.Context, expr Expr, want reflect.Type) (any, error) + type ResolutionPolicy string + const Eager + const ProviderBacked + type Resolver func(context.Context, *Registry, []Expr) (any, error) + type Schema struct + Sections []SectionDefinition + Version int + func (s Schema) CheckVersion(d *Document) error + func (s Schema) Enrich(d *Document) error + func (s Schema) Field(section, key string) (Field, bool) + func (s Schema) Inspect(d *Document, section, key string, p DisplayPolicy) (string, bool) + func (s Schema) InspectionDocument(d *Document, p DisplayPolicy) *Document + func (s Schema) Sample() *Document + func (s Schema) Seed() *Document + func (s Schema) WritableField(section, key string) (Field, bool) + type Section struct + Items []Item + Name string + func (s *Section) Delete(key string) bool + func (s *Section) Entry(key string) (Entry, int, bool) + func (s *Section) Set(key string, value Expr) + type SectionDefinition struct + Documentation []string + ExampleNames []string + Fields []Field + GoName string + GoType string + Name string + Repeated bool + type Version struct