settings

package
v1.4.4 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2026 License: MIT Imports: 16 Imported by: 58

Documentation

Index

Constants

View Source
const (
	StructuredOutputSlug = "structured-output"
	StructuredOutputFlag = "format"
)

Variables

This section is empty.

Functions

func NewStructuredOutputSection added in v1.4.0

func NewStructuredOutputSection(options ...schema.SectionOption) (*schema.SectionImpl, error)

func SetupStructuredOutput added in v1.4.0

func SetupStructuredOutput(
	sectionValues *values.SectionValues,
	writer io.Writer,
	options ...middlewares.TableProcessorOption,
) (*middlewares.TableProcessor, formatters.OutputFormatter, error)

func StructuredOutputFormats added in v1.4.2

func StructuredOutputFormats() []string

StructuredOutputFormats returns the supported structured-output format values. It is exported so that tooling (such as the glazed-migrate analyzer) can validate format values without hardcoding the list.

Types

type OutputFormat added in v1.4.0

type OutputFormat string
const (
	OutputTable OutputFormat = "table"
	OutputJSON  OutputFormat = "json"
	OutputJSONL OutputFormat = "jsonl"
	OutputCSV   OutputFormat = "csv"
	OutputTSV   OutputFormat = "tsv"
	OutputYAML  OutputFormat = "yaml"
)

type StructuredOutputSettings added in v1.4.0

type StructuredOutputSettings struct {
	Format        OutputFormat `glazed:"format"`
	OutputFields  []string     `glazed:"output-fields"`
	MaxOutputRows int          `glazed:"max-output-rows"`
}

func DecodeStructuredOutputSettings added in v1.4.0

func DecodeStructuredOutputSettings(sectionValues *values.SectionValues) (*StructuredOutputSettings, error)

func SetupStructuredProcessor added in v1.4.0

func SetupStructuredProcessor(
	sectionValues *values.SectionValues,
	options ...middlewares.TableProcessorOption,
) (*middlewares.TableProcessor, *StructuredOutputSettings, error)

SetupStructuredProcessor creates the row-processing portion of structured output without attaching a formatter. This is useful for programmatic callers that want projected/capped rows as a Table instead of serialized bytes.

Jump to

Keyboard shortcuts

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