utils

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2026 License: Apache-2.0 Imports: 11 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Digest32

func Digest32(str string) string

Digest32 returns a 32-bit hash of the input string. The hash is represented as a hexadecimal string of length 8.

func Digest256

func Digest256(str string) string

Digest256 returns a sha256 hash of the input string. The hash is represented as a hexadecimal string of length 64.

func GetHashedName

func GetHashedName(nsName string, length int) string

GetHashedName returns a partially hashed name for the string including up to the given length of the original name characters before the hash. Input `nsName` should be formatted as `{Namespace}/{ResourceName}`.

func Merge added in v1.4.0

func Merge[T any](original, patch T, mergeType egv1a1.MergeType) (T, error)

func MergeWithPatch added in v1.4.0

func MergeWithPatch[T any](original T, patch *egv1a1.KubernetesPatchSpec) (T, error)

func NamespacedName

func NamespacedName(obj client.Object) types.NamespacedName

NamespacedName creates and returns object's NamespacedName.

Types

type NamespacedNameWithGroupKind added in v1.0.2

type NamespacedNameWithGroupKind struct {
	types.NamespacedName
	schema.GroupKind
}

func GetNamespacedNameWithGroupKind added in v1.0.2

func GetNamespacedNameWithGroupKind(obj client.Object) NamespacedNameWithGroupKind

GetNamespacedNameWithGroupKind creates and returns object's NamespacedNameWithGroupKind.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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