Documentation
¶
Index ¶
- func NewText(fs embed.FS, path string) string
- type Index
- type Indices
- type Inherit
- type Keyword
- type Store
- func (t Store) Doc(w io.Writer, kind naming.Kind, driver, kw string, depth int) error
- func (t Store) DriverKeywords(section, typ string, kind naming.Kind) ([]Keyword, error)
- func (t Store) KeywordsByDriver(kind naming.Kind) map[Index]map[string]Keyword
- func (t Store) Len() int
- func (t Store) Less(i, j int) bool
- func (t Store) Lookup(k key.T, kind naming.Kind, sectionType string) Keyword
- func (t Store) Swap(i, j int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Keyword ¶
type Keyword struct {
Section string
Option string
Attr string
// Scopable means the keyword can have a different value on nodes, drpnodes, encapnodes or a specific node.
Scopable bool
// Required means the keyword mean be set, and thus disregards the default value.
Required bool
// Converter is the name of a registered routine converting a string into the keyword expected type.
Converter string
// Text is a text explaining the role of the keyword.
Text string
// DefaultText is a text explaining the default value.
DefaultText string
// Example demonstrates the keyword usage.
Example string
// Default is the value returned when the non-required keyword is not set.
Default string
// DefaultOption is the name of the option looked up in the
// DEFAULT section if the keyword is not set. If not set,
// the string in the Option field is looked up in the DEFAULT
// section.
DefaultOption string
// Candidates is the list of accepted values. An empty list.
Candidates []string
// Depends is a list of key-value conditions to meet to accept this keyword in a config.
Depends []keyop.T
// Kind limits the scope of this keyword to the object with kind matching this mask.
Kind naming.Kinds
// Provisioning is set to true for keywords only used for resource provisioning
Provisioning bool
// Types limits the scope of the keyword to sections with matching type value
Types []string
// Aliases defines alternate names of the keyword.
Aliases []string
// Inherit defines weither DEFAULT.<name> overrides <rid>.<name> (Head2Leaf), or
// <rid>.<name> overrides DEFAULT.<name> (Leaf2Head, the default), or only <rid>.<name>
// is used (Leaf).
Inherit Inherit
// Deprecated is the release where the keyword has been deprecated. Users can
// expect the keyword to be unsupported in the next release.
Deprecated string
// ReplacedBy means the keyword is deprecated but another keyword can be used instead.
ReplacedBy string
}
Keyword represents a configuration option in an object or node configuration file
func (Keyword) DefaultKey ¶
type Store ¶
type Store []Keyword
func (Store) DriverKeywords ¶
func (Store) KeywordsByDriver ¶
Click to show internal directories.
Click to hide internal directories.