kubernetes: k8s.io/kubernetes/pkg/kubectl/apply/parse Index | Files

package parse

import "k8s.io/kubernetes/pkg/kubectl/apply/parse"

Index

Package Files

factory.go item.go list_element.go map_element.go openapi.go primitive_element.go type_element.go util.go visitor.go

type ElementBuildingVisitor Uses

type ElementBuildingVisitor struct {
    // contains filtered or unexported fields
}

ElementBuildingVisitor creates an Elements from Items An Element combines the values from the Item with the field metadata.

func (ElementBuildingVisitor) CreateListElement Uses

func (v ElementBuildingVisitor) CreateListElement(item *listItem) (apply.Element, error)

CreateListElement creates a ListElement

func (ElementBuildingVisitor) CreateMapElement Uses

func (v ElementBuildingVisitor) CreateMapElement(item *mapItem) (apply.Element, error)

CreateMapElement creates a mapElement

func (ElementBuildingVisitor) CreatePrimitiveElement Uses

func (v ElementBuildingVisitor) CreatePrimitiveElement(item *primitiveItem) (apply.Element, error)

CreatePrimitiveElement creates a primitiveElement

func (ElementBuildingVisitor) CreateTypeElement Uses

func (v ElementBuildingVisitor) CreateTypeElement(item *typeItem) (apply.Element, error)

CreateTypeElement creates a typeElement

type Factory Uses

type Factory struct {
    // Resources contains the openapi field metadata for the object models
    Resources openapi.Resources
}

Factory creates an Element by combining object values from recorded, local and remote sources with the metadata from an openapi schema.

func (*Factory) CreateElement Uses

func (b *Factory) CreateElement(recorded, local, remote map[string]interface{}) (apply.Element, error)

CreateElement returns an Element by collating the recorded, local and remote field values

type Item Uses

type Item interface {
    // CreateElement merges the values in the item into a combined Element
    CreateElement(ItemVisitor) (apply.Element, error)
}

Item wraps values from 3 sources (recorded, local, remote). The values are not collated

type ItemVisitor Uses

type ItemVisitor interface {
    // CreatePrimitiveElement builds an Element for a primitiveItem
    CreatePrimitiveElement(*primitiveItem) (apply.Element, error)

    // CreateListElement builds an Element for a listItem
    CreateListElement(*listItem) (apply.Element, error)

    // CreateMapElement builds an Element for a mapItem
    CreateMapElement(*mapItem) (apply.Element, error)

    // CreateTypeElement builds an Element for a typeItem
    CreateTypeElement(*typeItem) (apply.Element, error)
}

ItemVisitor provides an interface for Items to Accept and call the Visit function that corresponds to its actual type.

Package parse imports 7 packages (graph) and is imported by 4 packages. Updated 2019-06-21. Refresh now. Tools for package owners.