kunstruct

package
v2.0.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package kunstruct provides unstructured from api machinery and factory for creating unstructured

Package kunstruct provides unstructured from api machinery and factory for creating unstructured

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewKunstructuredFactoryImpl

func NewKunstructuredFactoryImpl() ifc.KunstructuredFactory

NewKunstructuredFactoryImpl returns a factory.

func NewKunstructuredFromObject

func NewKunstructuredFromObject(obj runtime.Object) (ifc.Kunstructured, error)

NewKunstructuredFromObject returns a new instance of Kunstructured.

Types

type KunstructuredFactoryImpl added in v1.0.11

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

KunstructuredFactoryImpl hides construction using apimachinery types.

func (*KunstructuredFactoryImpl) FromMap added in v1.0.11

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

FromMap returns an instance of Kunstructured.

func (*KunstructuredFactoryImpl) MakeConfigMap added in v1.0.11

MakeConfigMap returns an instance of Kunstructured for ConfigMap

func (*KunstructuredFactoryImpl) MakeSecret added in v1.0.11

MakeSecret returns an instance of Kunstructured for Secret

func (*KunstructuredFactoryImpl) Set added in v1.0.11

func (kf *KunstructuredFactoryImpl) Set(ldr ifc.Loader)

Set sets loader

func (*KunstructuredFactoryImpl) SliceFromBytes added in v1.0.11

func (kf *KunstructuredFactoryImpl) SliceFromBytes(
	in []byte) ([]ifc.Kunstructured, error)

SliceFromBytes returns a slice of Kunstructured.

type UnstructAdapter

type UnstructAdapter struct {
	unstructured.Unstructured
}

UnstructAdapter wraps unstructured.Unstructured from https://github.com/kubernetes/apimachinery/blob/master/

pkg/apis/meta/v1/unstructured/unstructured.go

to isolate dependence on apimachinery.

func (*UnstructAdapter) Copy

func (fs *UnstructAdapter) Copy() ifc.Kunstructured

Copy provides a copy behind an interface.

func (*UnstructAdapter) GetFieldValue

func (fs *UnstructAdapter) GetFieldValue(path string) (string, error)

GetFieldValue returns value at the given fieldpath.

func (*UnstructAdapter) GetGvk

func (fs *UnstructAdapter) GetGvk() gvk.Gvk

GetGvk returns the Gvk name of the object.

func (*UnstructAdapter) Map

func (fs *UnstructAdapter) Map() map[string]interface{}

Map returns the unstructured content map.

func (*UnstructAdapter) SetMap

func (fs *UnstructAdapter) SetMap(m map[string]interface{})

SetMap overrides the unstructured content map.

Jump to

Keyboard shortcuts

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