Documentation
¶
Index ¶
Constants ¶
const DefaultSlug = layers.DefaultSlug
DefaultSlug is the default slug used for the default schema section.
Variables ¶
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.