chart-doc-gen: kmodules.xyz/chart-doc-gen/walk Index | Files

package walk

import "kmodules.xyz/chart-doc-gen/walk"

Index

Package Files

associative_sequence.go comment.go map.go nonassociative_sequence.go scalar.go visitor.go walk.go

Variables

var ClearNode *yaml.RNode

ClearNode is returned if GrepFilter should do nothing after calling Set

func CommentValue Uses

func CommentValue(line string) string

type ListKind Uses

type ListKind int32
const (
    AssociativeList ListKind = 1 + iota
    NonAssociateList
)

type Visitor Uses

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 Uses

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 Uses

func (l Walker) GetSchema() *openapi.ResourceSchema

func (Walker) Kind Uses

func (l Walker) Kind() yaml.Kind

func (Walker) Walk Uses

func (l Walker) Walk() (*yaml.RNode, error)

GrepFilter implements yaml.GrepFilter

Package walk imports 7 packages (graph). Updated 2020-06-10. Refresh now. Tools for package owners.