Documentation ¶
Index ¶
- Variables
- type At
- type Attribute
- func Attributes(attrs ...*Attribute) []*Attribute
- func Bool(name string, options ...Option) *Attribute
- func Float(name string, options ...Option) *Attribute
- func Int(name string, options ...Option) *Attribute
- func String(name string, options ...Option) *Attribute
- func StringSlice(name string, options ...Option) *Attribute
- type AttributeValidator
- type Node
- func Define(match StringMatch, attrs []*Attribute, children ...*Node) *Node
- func DefineGroup(match string, children ...*Node) *Node
- func DefineIter(attrs []*Attribute, children ...*Node) *Node
- func DefineIterGroup(attrs []*Attribute, children ...*Node) *Node
- func Root(attrs []*Attribute, children ...*Node) *Node
- type Option
- func Compat(path ...StringMatch) Option
- func Default[T any](val T) Option
- func InSet[T string | int | float64](elms ...T) Option
- func IsCID() Option
- func IsEmail() Option
- func IsFqdn() Option
- func IsHttpMethod() Option
- func IsVariableName() Option
- func Key() Option
- func Path(path ...StringMatch) Option
- func Required() Option
- func Validator[T any](validator func(T) error) Option
- type Parser
- type Schema
- type StringMatch
- type StringMatchAll
- type StringMatcher
- type SupportedTypes
- type Type
Constants ¶
This section is empty.
Variables ¶
View Source
var NodeDefaultSeerLeaf = "config"
Functions ¶
This section is empty.
Types ¶
type Attribute ¶
type Attribute struct { Name string Type Type Required bool Key bool // means the value is the key of a map Default any Path []StringMatch Compat []StringMatch Validator AttributeValidator }
func Attributes ¶
func StringSlice ¶
type AttributeValidator ¶
type Node ¶
type Node struct { Group bool Match StringMatch Attributes []*Attribute Children []*Node }
func DefineGroup ¶
func DefineIter ¶
func DefineIterGroup ¶
type Option ¶
type Option func(*Attribute)
func Compat ¶
func Compat(path ...StringMatch) Option
func IsHttpMethod ¶
func IsHttpMethod() Option
func IsVariableName ¶
func IsVariableName() Option
func Path ¶
func Path(path ...StringMatch) Option
type Schema ¶
func SchemaDefinition ¶
type StringMatch ¶
type StringMatch any // string or PathMatcher
type StringMatchAll ¶
type StringMatchAll struct{}
func (StringMatchAll) Match ¶
func (StringMatchAll) Match(string) bool
func (StringMatchAll) String ¶
func (StringMatchAll) String() string
type StringMatcher ¶
func All ¶
func All() StringMatcher
func Either ¶
func Either(values ...string) StringMatcher
Click to show internal directories.
Click to hide internal directories.