schema

package
v0.7.10 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultSlug = layers.DefaultSlug

DefaultSlug is the default slug used for the default schema section.

Variables

View Source
var (
	WithPrefix      = layers.WithPrefix
	WithName        = layers.WithName
	WithDescription = layers.WithDescription
	WithDefaults    = layers.WithDefaults
	// WithFields attaches field definitions to a section.
	// It is a clearer alias for the historical layers.WithParameterDefinitions.
	WithFields    = layers.WithParameterDefinitions
	WithArguments = layers.WithArguments
)

Re-export common section options for convenience

Functions

This section is empty.

Types

type Schema

type Schema = layers.ParameterLayers

Schema is a type alias for layers.ParameterLayers. Schema is an ordered collection of schema sections.

func NewSchema

func NewSchema(options ...SchemaOption) *Schema

NewSchema creates a new collection of schema sections. It wraps layers.NewParameterLayers.

type SchemaOption

type SchemaOption = layers.ParameterLayersOption

SchemaOption is a type alias for layers.ParameterLayersOption. SchemaOption configures a Schema collection during construction.

func WithSections

func WithSections(sections ...Section) SchemaOption

WithSections returns a SchemaOption that adds the given sections to a Schema collection. It wraps layers.WithLayers.

type Section

type Section = layers.ParameterLayer

Section is a type alias for layers.ParameterLayer. A Section represents a named group of field definitions (schema section).

func NewGlazedSchema

func NewGlazedSchema(options ...settings.GlazeParameterLayerOption) (Section, error)

NewGlazedSchema creates a new glazed schema section containing all glazed output/formatting settings. It wraps settings.NewGlazedParameterLayers.

type SectionImpl

type SectionImpl = layers.ParameterLayerImpl

SectionImpl is a type alias for layers.ParameterLayerImpl. SectionImpl is the common concrete implementation of Section.

func NewSection

func NewSection(slug string, name string, options ...SectionOption) (*SectionImpl, error)

NewSection creates a new schema section with the given slug and name. It wraps layers.NewParameterLayer.

type SectionOption

type SectionOption = layers.ParameterLayerOptions

SectionOption is a type alias for layers.ParameterLayerOptions. SectionOption configures a Section during construction.

Jump to

Keyboard shortcuts

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