reader

package
v3.18.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: Apache-2.0 Imports: 21 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsConfig added in v3.18.1

func IsConfig(u *unstructured.Unstructured) bool

func IsConstraint added in v3.18.1

func IsConstraint(u *unstructured.Unstructured) bool

func IsGVKManifest added in v3.18.1

func IsGVKManifest(u *unstructured.Unstructured) bool

func IsSyncSet added in v3.18.1

func IsSyncSet(u *unstructured.Unstructured) bool

func IsTemplate added in v3.18.1

func IsTemplate(u *unstructured.Unstructured) bool

func ReadConstraint

func ReadConstraint(f fs.FS, path string) (*unstructured.Unstructured, error)

func ReadExpansion added in v3.18.1

func ReadExpansion(f fs.FS, path string) (*unstructured.Unstructured, error)

func ReadK8sResources

func ReadK8sResources(r io.Reader) ([]*unstructured.Unstructured, error)

ReadK8sResources reads JSON or YAML k8s resources from an io.Reader, decoding them into Unstructured objects and returning those objects as a slice.

func ReadObject

func ReadObject(f fs.FS, path string) (*unstructured.Unstructured, error)

ReadObject reads a file from the filesystem abstraction at the specified path, and returns an unstructured.Unstructured object if the file can be successfully unmarshalled.

func ReadSources

func ReadSources(filenames []string, images []string, tempDir string) ([]*unstructured.Unstructured, error)

func ReadTemplate

func ReadTemplate(scheme *runtime.Scheme, f fs.FS, path string) (*templates.ConstraintTemplate, error)

ReadTemplate reads the contents of the path and returns the ConstraintTemplate it defines. Returns an error if the file does not define a ConstraintTemplate.

func ReadUnstructured added in v3.18.1

func ReadUnstructured(bytes []byte) (*unstructured.Unstructured, error)

func ReadUnstructureds

func ReadUnstructureds(bytes []byte) ([]*unstructured.Unstructured, error)

func ToConfig added in v3.18.1

ToConfig converts an unstructured Config into a Config struct.

func ToGVKManifest added in v3.18.1

ToGVKManifest converts an unstructured GVKManifest into a GVKManifest struct.

func ToStructured added in v3.18.1

func ToStructured(scheme *runtime.Scheme, u *unstructured.Unstructured) (runtime.Object, error)

ToStructured converts an unstructured object into an object with the schema defined by u's group, version, and kind.

func ToSyncSet added in v3.18.1

ToSyncSet converts an unstructured SyncSet into a SyncSet struct.

func ToTemplate

ToTemplate converts an unstructured template into a versionless ConstraintTemplate struct.

Types

This section is empty.

Jump to

Keyboard shortcuts

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