Documentation ¶
Index ¶
- func BuildModel(node *yaml.Node, model interface{}) error
- func BuildModelAsync(n *yaml.Node, model interface{}, lwg *sync.WaitGroup, errors *[]error)
- func ExtractExtensions(root *yaml.Node) map[KeyReference[string]]ValueReference[any]
- func ExtractMapFlat[PT Buildable[N], N any](label string, root *yaml.Node, idx *index.SpecIndex) (map[KeyReference[string]]ValueReference[PT], *yaml.Node, *yaml.Node, error)
- func ExtractMapFlatNoLookup[PT Buildable[N], N any](root *yaml.Node, idx *index.SpecIndex) (map[KeyReference[string]]ValueReference[PT], error)
- func ExtractObjectRaw[T Buildable[N], N any](root *yaml.Node, idx *index.SpecIndex) (T, error)
- func GetCircularReferenceResult(node *yaml.Node, idx *index.SpecIndex) *index.CircularReferenceResult
- func IsCircular(node *yaml.Node, idx *index.SpecIndex) bool
- func LocateRefNode(root *yaml.Node, idx *index.SpecIndex) (*yaml.Node, error)
- func SetField(field reflect.Value, valueNode *yaml.Node, keyNode *yaml.Node) error
- type Buildable
- type HasNode
- type KeyReference
- type NodeReference
- type ValueReference
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildModel ¶
func BuildModel(node *yaml.Node, model interface{}) error
func BuildModelAsync ¶
func ExtractExtensions ¶
func ExtractExtensions(root *yaml.Node) map[KeyReference[string]]ValueReference[any]
func ExtractMapFlat ¶
func ExtractMapFlat[PT Buildable[N], N any](label string, root *yaml.Node, idx *index.SpecIndex) (map[KeyReference[string]]ValueReference[PT], *yaml.Node, *yaml.Node, error)
func ExtractMapFlatNoLookup ¶
func ExtractMapFlatNoLookup[PT Buildable[N], N any](root *yaml.Node, idx *index.SpecIndex) (map[KeyReference[string]]ValueReference[PT], error)
func ExtractObjectRaw ¶
func GetCircularReferenceResult ¶
func GetCircularReferenceResult(node *yaml.Node, idx *index.SpecIndex) *index.CircularReferenceResult
func IsCircular ¶
func LocateRefNode ¶
Types ¶
type KeyReference ¶
type KeyReference[T any] struct { Value T KeyNode *yaml.Node }
func (KeyReference[T]) GenerateMapKey ¶
func (n KeyReference[T]) GenerateMapKey() string
func (KeyReference[T]) IsEmpty ¶
func (n KeyReference[T]) IsEmpty() bool
type NodeReference ¶
type NodeReference[T any] struct { Value T ValueNode *yaml.Node KeyNode *yaml.Node }
func ExtractExample ¶
func ExtractExample(expNode, expLabel *yaml.Node) NodeReference[any]
func ExtractObject ¶
func (NodeReference[T]) GenerateMapKey ¶
func (n NodeReference[T]) GenerateMapKey() string
func (NodeReference[T]) IsEmpty ¶
func (n NodeReference[T]) IsEmpty() bool
func (NodeReference[T]) Mutate ¶ added in v0.0.8
func (n NodeReference[T]) Mutate(value T) NodeReference[T]
type ValueReference ¶
type ValueReference[T any] struct { Value T ValueNode *yaml.Node }
func ExtractArray ¶
func FindItemInMap ¶
func FindItemInMap[T any](item string, collection map[KeyReference[string]]ValueReference[T]) *ValueReference[T]
func (ValueReference[T]) GenerateMapKey ¶
func (n ValueReference[T]) GenerateMapKey() string
func (ValueReference[T]) IsEmpty ¶
func (n ValueReference[T]) IsEmpty() bool
func (ValueReference[T]) Mutate ¶ added in v0.0.8
func (n ValueReference[T]) Mutate(value T) ValueReference[T]
Click to show internal directories.
Click to hide internal directories.