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 ¶
- func NewKunstructuredFactoryImpl() ifc.KunstructuredFactory
- func NewKunstructuredFromObject(obj runtime.Object) (ifc.Kunstructured, error)
- type KunstructuredFactoryImpl
- func (kf *KunstructuredFactoryImpl) FromMap(m map[string]interface{}) ifc.Kunstructured
- func (kf *KunstructuredFactoryImpl) MakeConfigMap(args *types.ConfigMapArgs, options *types.GeneratorOptions) (ifc.Kunstructured, error)
- func (kf *KunstructuredFactoryImpl) MakeSecret(args *types.SecretArgs, options *types.GeneratorOptions) (ifc.Kunstructured, error)
- func (kf *KunstructuredFactoryImpl) Set(ldr ifc.Loader)
- func (kf *KunstructuredFactoryImpl) 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 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
func (kf *KunstructuredFactoryImpl) MakeConfigMap(args *types.ConfigMapArgs, options *types.GeneratorOptions) (ifc.Kunstructured, error)
MakeConfigMap returns an instance of Kunstructured for ConfigMap
func (*KunstructuredFactoryImpl) MakeSecret ¶ added in v1.0.11
func (kf *KunstructuredFactoryImpl) MakeSecret(args *types.SecretArgs, options *types.GeneratorOptions) (ifc.Kunstructured, error)
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.