Documentation ¶
Overview ¶
Package kunstruct provides unstructured from api machinery and factory for creating unstructured
Index ¶
- func NewKunstructuredFactoryImpl() ifc.KunstructuredFactory
- func NewKunstructuredFromObject(obj runtime.Object) (ifc.Kunstructured, error)
- type KunstructurerFactoryImpl
- func (kf *KunstructurerFactoryImpl) FromMap(m map[string]interface{}) ifc.Kunstructured
- func (kf *KunstructurerFactoryImpl) MakeConfigMap(args *types.ConfigMapArgs, options *types.GeneratorOptions) (ifc.Kunstructured, error)
- func (kf *KunstructurerFactoryImpl) MakeSecret(args *types.SecretArgs, options *types.GeneratorOptions) (ifc.Kunstructured, error)
- func (kf *KunstructurerFactoryImpl) Set(fs fs.FileSystem, ldr ifc.Loader)
- func (kf *KunstructurerFactoryImpl) SliceFromBytes(in []byte) ([]ifc.Kunstructured, error)
- type UnstructAdapter
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 KunstructurerFactoryImpl ¶
type KunstructurerFactoryImpl struct {
// contains filtered or unexported fields
}
KunstructurerFactoryImpl hides construction using apimachinery types.
func (*KunstructurerFactoryImpl) FromMap ¶
func (kf *KunstructurerFactoryImpl) FromMap( m map[string]interface{}) ifc.Kunstructured
FromMap returns an instance of Kunstructured.
func (*KunstructurerFactoryImpl) MakeConfigMap ¶
func (kf *KunstructurerFactoryImpl) MakeConfigMap(args *types.ConfigMapArgs, options *types.GeneratorOptions) (ifc.Kunstructured, error)
MakeConfigMap returns an instance of Kunstructured for ConfigMap
func (*KunstructurerFactoryImpl) MakeSecret ¶
func (kf *KunstructurerFactoryImpl) MakeSecret(args *types.SecretArgs, options *types.GeneratorOptions) (ifc.Kunstructured, error)
MakeSecret returns an instance of Kunstructured for Secret
func (*KunstructurerFactoryImpl) Set ¶
func (kf *KunstructurerFactoryImpl) Set(fs fs.FileSystem, ldr ifc.Loader)
Set sets loader, filesystem and workdirectory
func (*KunstructurerFactoryImpl) SliceFromBytes ¶
func (kf *KunstructurerFactoryImpl) 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.