Documentation ¶
Index ¶
- func LoadAndConvertIntoObject(scheme *runtime.Scheme, filePath string, out interface{}) error
- func LoadAndUnmarshalIntoObject(filePath string, out interface{}) error
- func LoadKubernetesObjectsFromBytes(fileYaml []byte) ([]unstructured.Unstructured, error)
- func LoadKubernetesObjectsFromFile(filePath string) ([]unstructured.Unstructured, error)
- func LoadKubernetesObjectsFromFolder(folderPath string) ([]unstructured.Unstructured, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadAndConvertIntoObject ¶
LoadAndConvertIntoObject loads one Kubernetes object from a file into the out object. It uses the `Convert` method of `scheme` under the hood, so it does any conversion that method would do. LoadAndUnmarshalIntoObject provides similar functionality, without the conversion aspect. LoadAndUnmarshalIntoObject should only be used when there is no available scheme or when the user wants to explicitly block any conversions.
func LoadAndUnmarshalIntoObject ¶
LoadAndUnmarshalIntoObject loads one Kubernetes object from a file into the out object. LoadAndUnmarshalIntoObject provides similar functionality, but uses `runtime.Scheme.Convert` under the hood. LoadAndUnmarshalIntoObject should only be used when there is no available scheme or when the user wants to explicitly block any conversions.
func LoadKubernetesObjectsFromBytes ¶
func LoadKubernetesObjectsFromBytes(fileYaml []byte) ([]unstructured.Unstructured, error)
Loads kubernetes objects from given bytes. A single file may contain multiple objects separated by "---\n".
func LoadKubernetesObjectsFromFile ¶
func LoadKubernetesObjectsFromFile(filePath string) ([]unstructured.Unstructured, error)
Loads kubernetes objects from the given file.
func LoadKubernetesObjectsFromFolder ¶
func LoadKubernetesObjectsFromFolder(folderPath string) ([]unstructured.Unstructured, error)
Loads kubernets objects from all .yaml files in the given folder. Does not recurse into subfolders. Preserves lexical file order.
Types ¶
This section is empty.