docs

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package docs holds Sonde's single compatibility doc-data source (table.yaml) and its typed accessors. docs/compat.md and the LSP's hover text are both rendered from this table so they can never drift from each other.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RenderCompat

func RenderCompat(t *Table) ([]byte, error)

RenderCompat renders docs/compat.md from t using compat.md.tmpl. The result is deterministic for a given Table.

Types

type Difference

type Difference struct {
	Area  string `yaml:"area"`
	Input string `yaml:"input"`
	Hurl  string `yaml:"hurl"`
	Sonde string `yaml:"sonde"`
}

Difference is one row of documented behavior that differs from the reference implementation for inputs outside the conformance test tree.

type Entry

type Entry struct {
	Name   string `yaml:"name"`
	Status Status `yaml:"status"`
	Phase  int    `yaml:"phase,omitempty"`
	Doc    string `yaml:"doc"`
	Reason string `yaml:"reason,omitempty"`
	Usage  int    `yaml:"usage,omitempty"`
	Short  string `yaml:"short,omitempty"`
	Arg    string `yaml:"arg,omitempty"`
	// Deprecated names the replacement of a deprecated entry.
	Deprecated string `yaml:"deprecated,omitempty"`
}

Entry is one query, filter, predicate, template function, request [Options] key, CLI flag, environment variable or config-file key.

type Status

type Status string

Status is how far along Sonde's support for an entry is.

const (
	StatusSupported   Status = "supported"
	StatusPartial     Status = "partial"
	StatusPlanned     Status = "planned"
	StatusUnsupported Status = "unsupported"
)

Statuses.

type Table

type Table struct {
	Queries     []Entry      `yaml:"queries"`
	Filters     []Entry      `yaml:"filters"`
	Predicates  []Entry      `yaml:"predicates"`
	Functions   []Entry      `yaml:"functions"`
	Options     []Entry      `yaml:"options"`
	Flags       []Entry      `yaml:"flags"`
	Env         []Entry      `yaml:"env"`
	Config      []Entry      `yaml:"config"`
	Differences []Difference `yaml:"differences"`
}

Table is the decoded, validated content of table.yaml.

func Load

func Load() (*Table, error)

Load returns the parsed, validated table.yaml. The result is cached; the returned *Table must be treated as read-only.

func (*Table) Lookup

func (t *Table) Lookup(kind, name string) (Entry, bool)

Lookup returns the entry named name within kind ("queries", "filters", "predicates", "functions", "options", "flags", "env" or "config"), used by the LSP for hover text.

Jump to

Keyboard shortcuts

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