wrappy

package
v0.8.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 12, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NoFieldError added in v0.6.5

type NoFieldError struct {
	Field string
}

func (NoFieldError) Error added in v0.6.5

func (e NoFieldError) Error() string

type WNode

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

WNode implements ifc.Kunstructured using yaml.RNode.

It exists only to help manage a switch from kunstruct.UnstructAdapter to yaml.RNode as the core representation of KRM objects in kustomize.

It's got a silly name because we don't want it around for long, and want its use to be obvious.

func FromMap added in v0.6.6

func FromMap(m map[string]interface{}) (*WNode, error)

func FromRNode

func FromRNode(node *yaml.RNode) *WNode

func NewWNode

func NewWNode() *WNode

func (*WNode) AsRNode added in v0.6.9

func (wn *WNode) AsRNode() *yaml.RNode

func (*WNode) Copy

func (wn *WNode) Copy() ifc.Kunstructured

Copy implements ifc.Kunstructured.

func (*WNode) GetAnnotations

func (wn *WNode) GetAnnotations() map[string]string

GetAnnotations implements ifc.Kunstructured.

func (*WNode) GetBinaryDataMap added in v0.8.1

func (wn *WNode) GetBinaryDataMap() map[string]string

GetBinaryDataMap implements ifc.Kunstructured.

func (*WNode) GetDataMap added in v0.6.8

func (wn *WNode) GetDataMap() map[string]string

GetDataMap implements ifc.Kunstructured.

func (*WNode) GetFieldValue

func (wn *WNode) GetFieldValue(path string) (interface{}, error)

GetFieldValue implements ifc.Kunstructured.

func (*WNode) GetGvk

func (wn *WNode) GetGvk() resid.Gvk

GetGvk implements ifc.Kunstructured.

func (*WNode) GetKind

func (wn *WNode) GetKind() string

GetKind implements ifc.Kunstructured.

func (*WNode) GetLabels

func (wn *WNode) GetLabels() map[string]string

GetLabels implements ifc.Kunstructured.

func (*WNode) GetName

func (wn *WNode) GetName() string

GetName implements ifc.Kunstructured.

func (*WNode) GetSlice

func (wn *WNode) GetSlice(path string) ([]interface{}, error)

GetSlice implements ifc.Kunstructured.

func (*WNode) GetString

func (wn *WNode) GetString(path string) (string, error)

GetSlice implements ifc.Kunstructured.

func (*WNode) Map

func (wn *WNode) Map() map[string]interface{}

Map implements ifc.Kunstructured.

func (*WNode) MarshalJSON

func (wn *WNode) MarshalJSON() ([]byte, error)

MarshalJSON implements ifc.Kunstructured.

func (*WNode) MatchesAnnotationSelector

func (wn *WNode) MatchesAnnotationSelector(selector string) (bool, error)

MatchesAnnotationSelector implements ifc.Kunstructured.

func (*WNode) MatchesLabelSelector

func (wn *WNode) MatchesLabelSelector(selector string) (bool, error)

MatchesLabelSelector implements ifc.Kunstructured.

func (*WNode) SetAnnotations

func (wn *WNode) SetAnnotations(annotations map[string]string)

SetAnnotations implements ifc.Kunstructured.

func (*WNode) SetBinaryDataMap added in v0.8.1

func (wn *WNode) SetBinaryDataMap(m map[string]string)

SetBinaryDataMap implements ifc.Kunstructured.

func (*WNode) SetDataMap added in v0.6.8

func (wn *WNode) SetDataMap(m map[string]string)

SetDataMap implements ifc.Kunstructured.

func (*WNode) SetGvk

func (wn *WNode) SetGvk(gvk resid.Gvk)

SetGvk implements ifc.Kunstructured.

func (*WNode) SetLabels

func (wn *WNode) SetLabels(labels map[string]string)

SetLabels implements ifc.Kunstructured.

func (*WNode) SetName

func (wn *WNode) SetName(name string)

SetName implements ifc.Kunstructured.

func (*WNode) SetNamespace

func (wn *WNode) SetNamespace(ns string)

SetNamespace implements ifc.Kunstructured.

func (*WNode) UnmarshalJSON

func (wn *WNode) UnmarshalJSON(data []byte) error

UnmarshalJSON implements ifc.Kunstructured.

type WNodeFactory

type WNodeFactory struct {
}

WNodeFactory makes instances of WNode.

These instances in turn adapt

sigs.k8s.io/kustomize/kyaml/yaml.RNode

to implement ifc.Unstructured. This factory is meant to implement ifc.KunstructuredFactory.

This implementation should be thin, as both WNode and WNodeFactory must be factored away (deleted) along with ifc.Kunstructured in favor of direct use of RNode methods upon completion of https://github.com/kubernetes-sigs/kustomize/issues/2506.

See also api/krusty/internal/provider/depprovider.go

func (*WNodeFactory) FromMap

func (k *WNodeFactory) FromMap(m map[string]interface{}) ifc.Kunstructured

func (*WNodeFactory) Hasher

func (k *WNodeFactory) Hasher() ifc.KunstructuredHasher

func (*WNodeFactory) MakeConfigMap

func (k *WNodeFactory) MakeConfigMap(
	ldr ifc.KvLoader, args *types.ConfigMapArgs) (ifc.Kunstructured, error)

MakeConfigMap makes a wrapped configmap.

func (*WNodeFactory) MakeSecret

func (k *WNodeFactory) MakeSecret(
	ldr ifc.KvLoader, args *types.SecretArgs) (ifc.Kunstructured, error)

MakeSecret makes a wrapped secret.

func (*WNodeFactory) SliceFromBytes

func (k *WNodeFactory) SliceFromBytes(bs []byte) ([]ifc.Kunstructured, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL