Documentation ¶
Index ¶
- func IsConfig(u *unstructured.Unstructured) bool
- func IsConstraint(u *unstructured.Unstructured) bool
- func IsGVKManifest(u *unstructured.Unstructured) bool
- func IsSyncSet(u *unstructured.Unstructured) bool
- func IsTemplate(u *unstructured.Unstructured) bool
- func ReadConstraint(f fs.FS, path string) (*unstructured.Unstructured, error)
- func ReadExpansion(f fs.FS, path string) (*unstructured.Unstructured, error)
- func ReadK8sResources(r io.Reader) ([]*unstructured.Unstructured, error)
- func ReadObject(f fs.FS, path string) (*unstructured.Unstructured, error)
- func ReadSources(filenames []string, images []string, tempDir string) ([]*unstructured.Unstructured, error)
- func ReadTemplate(scheme *runtime.Scheme, f fs.FS, path string) (*templates.ConstraintTemplate, error)
- func ReadUnstructured(bytes []byte) (*unstructured.Unstructured, error)
- func ReadUnstructureds(bytes []byte) ([]*unstructured.Unstructured, error)
- func ToConfig(scheme *runtime.Scheme, u *unstructured.Unstructured) (*configv1alpha1.Config, error)
- func ToGVKManifest(scheme *runtime.Scheme, u *unstructured.Unstructured) (*gvkmanifestv1alpha1.GVKManifest, error)
- func ToStructured(scheme *runtime.Scheme, u *unstructured.Unstructured) (runtime.Object, error)
- func ToSyncSet(scheme *runtime.Scheme, u *unstructured.Unstructured) (*syncsetv1alpha1.SyncSet, error)
- func ToTemplate(scheme *runtime.Scheme, u *unstructured.Unstructured) (*templates.ConstraintTemplate, error)
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
func ToConfig(scheme *runtime.Scheme, u *unstructured.Unstructured) (*configv1alpha1.Config, error)
ToConfig converts an unstructured Config into a Config struct.
func ToGVKManifest ¶ added in v3.18.1
func ToGVKManifest(scheme *runtime.Scheme, u *unstructured.Unstructured) (*gvkmanifestv1alpha1.GVKManifest, error)
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
func ToSyncSet(scheme *runtime.Scheme, u *unstructured.Unstructured) (*syncsetv1alpha1.SyncSet, error)
ToSyncSet converts an unstructured SyncSet into a SyncSet struct.
func ToTemplate ¶
func ToTemplate(scheme *runtime.Scheme, u *unstructured.Unstructured) (*templates.ConstraintTemplate, error)
ToTemplate converts an unstructured template into a versionless ConstraintTemplate struct.
Types ¶
This section is empty.