Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
ClearNode is returned if GrepFilter should do nothing after calling Set
Functions ¶
Types ¶
type Visitor ¶
type Visitor interface { VisitMap(*yaml.RNode, *openapi.ResourceSchema) (*yaml.RNode, error) VisitScalar(*yaml.RNode, *openapi.ResourceSchema) (*yaml.RNode, error) VisitList(*yaml.RNode, *openapi.ResourceSchema, ListKind) (*yaml.RNode, error) VisitLeaf(*yaml.RNode, *yaml.RNode, string, *openapi.ResourceSchema) (*yaml.RNode, error) }
Visitor is invoked by walk with source and destination node pairs
type Walker ¶
type Walker struct { // Visitor is invoked by GrepFilter Visitor Schema *openapi.ResourceSchema // Source is the RNode to walk. All Source fields and associative list elements // will be visited. Source *yaml.RNode // Path is the field path to the current Source Node. Path []string // InferAssociativeLists if set to true will infer merge strategies for // fields which it doesn't have the schema based on the fields in the // list elements. InferAssociativeLists bool // VisitKeysAsScalars if true will call VisitScalar on map entry keys, // providing nil as the OpenAPI schema. VisitKeysAsScalars bool }
Walker walks the Source RNode and modifies the RNode provided to GrepFilter.
func (Walker) GetSchema ¶
func (l Walker) GetSchema() *openapi.ResourceSchema
Click to show internal directories.
Click to hide internal directories.