util

package
v1.5.10-test Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2026 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareObjectMeta

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

func ComposePkgObjName

func ComposePkgObjName(repoName, path, packageName string) string

func ComposePkgRevObjName

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

func GenerateUid

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

func GetInClusterNamespace

func GetInClusterNamespace() (string, error)

func GetPRWorkspaceName

func GetPRWorkspaceName(k8sName string) string

func GetPorchApiServiceKey

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

func RetryOnError

func RetryOnError(retries int, f func(retryNumber int) error) error

func RetryOnErrorConditional

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

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

func SplitIn3OnDelimiter

func SplitIn3OnDelimiter(splitee, delimiter string) []string

func ValidPkgObjName

func ValidPkgObjName(repoName, path, packageName string) error

func ValidPkgRevObjName

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

func ValidateDirectoryName

func ValidateDirectoryName(directory string, mandatory bool) error

func ValidateK8SName

func ValidateK8SName(k8sName string) error

func ValidateRepository

func ValidateRepository(repoName, directory string) error

Types

This section is empty.

Directories

Path Synopsis
Package context adds porch context to the incoming request context.
Package context adds porch context to the incoming request context.

Jump to

Keyboard shortcuts

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