util

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2025 License: Apache-2.0 Imports: 19 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareObjectMeta added in v1.4.0

func CompareObjectMeta(left metav1.ObjectMeta, right metav1.ObjectMeta) bool

func ComposePkgObjName added in v1.4.0

func ComposePkgObjName(repoName, path, packageName string) string

func ComposePkgRevObjName added in v1.4.0

func ComposePkgRevObjName(repoName, path, packageName, workspace string) string

func GenerateUid added in v1.4.0

func GenerateUid(prefix string, kubeNs string, kubeName string) types.UID

func GetInClusterNamespace

func GetInClusterNamespace() (string, error)

func GetPorchApiServiceKey added in v1.3.1

func GetPorchApiServiceKey(ctx context.Context) (client.ObjectKey, error)

func ParsePkgRevObjName added in v1.4.0

func ParsePkgRevObjName(name string) ([]string, error)

func ParsePkgRevObjNameField added in v1.4.0

func ParsePkgRevObjNameField(pkgRevObjName string, field int) (string, error)

func RetryOnErrorConditional added in v1.4.0

func RetryOnErrorConditional(retries int, shouldRetryFunc func(error) bool, f func(retryNumber int) error) error

RetryOnErrorConditional retries f up to retries times if it returns an error that matches shouldRetryFunc

func SafeReverse added in v1.4.0

func SafeReverse[S ~[]E, E any](s S)

func SchemaToMetaGVR added in v1.3.1

func ValidPkgObjName added in v1.4.0

func ValidPkgObjName(repoName, path, packageName string) error

func ValidPkgRevObjName added in v1.4.0

func ValidPkgRevObjName(repoName, path, packageName, workspace string) error

func ValidateDirectoryName added in v1.4.0

func ValidateDirectoryName(directory string, mandatory bool) error

func ValidateK8SName added in v1.4.0

func ValidateK8SName(k8sName string) error

func ValidateRepository added in v1.4.0

func ValidateRepository(repoName, directory string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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