Documentation
¶
Index ¶
- Constants
- func NewStructuredOutputSection(options ...schema.SectionOption) (*schema.SectionImpl, error)
- func SetupStructuredOutput(sectionValues *values.SectionValues, writer io.Writer, ...) (*middlewares.TableProcessor, formatters.OutputFormatter, error)
- func StructuredOutputFormats() []string
- type OutputFormat
- type StructuredOutputSettings
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.
Click to show internal directories.
Click to hide internal directories.