Documentation
¶
Overview ¶
Package aliasdata supplies node-based YAML anchor and alias policies. New without options explicitly selects retention of stream anchors. Source options default to document scope; WithPath(true) enables stream scope. WithStream explicitly overrides either default. Without an explicit selection, go-yaml uses ordinary document scope.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*Plugin)
Option configures an Alias-Data plugin.
func WithDisable ¶
WithDisable rejects alias references while allowing anchor declarations. Disabled policies do not read or validate saved source configuration.
func WithEnv ¶
WithEnv selects environment values with a bool, string, or string sequence. Only * has wildcard meaning in a string selector.
func WithPath ¶
WithPath controls dotted mapping and sequence lookups in alias names. Enabling paths enables stream mode unless WithStream overrides that default.
func WithStream ¶
WithStream controls retention of anchors across documents in one stream.
type Plugin ¶
type Plugin struct {
// contains filtered or unexported fields
}
Plugin stores reusable configuration. Sources are read once per context. Callers must not mutate supplied data while a new context is being created.
func New ¶
New creates a reusable plugin. Empty explicit selection enables stream mode. Validation does not read files or environment values.
func NewFromYAML ¶
NewFromYAML validates configuration without reading any source data. Nonempty configurations default to document scope unless path is true. An explicit stream setting overrides that default, matching YAMLStar.
func (*Plugin) NewAliasDataContext ¶
func (p *Plugin) NewAliasDataContext( services libyaml.AliasDataServices, ) (libyaml.AliasDataContext, error)
NewAliasDataContext snapshots configured sources for a fresh input stream.