util

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2024 License: MPL-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GVREquals

func GVREquals(r1, r2 schema.GroupVersionResource) bool

func HumanizeApproximateDuration

func HumanizeApproximateDuration(d time.Duration) string

func Index

func Index[T comparable](vs []T, t T) int

func JsonToYaml

func JsonToYaml(data []byte) ([]byte, error)

func ObjectWatcher added in v0.2.0

func ObjectWatcher[T client.Object](ctx context.Context, cluster *api.Cluster, resource *metav1.APIResource, prop observer.Property[[]T])

func ResourceEquals

func ResourceEquals(r1, r2 *v1.APIResource) bool

func ResourceGVK added in v0.2.0

func ResourceGVK(resource *v1.APIResource) schema.GroupVersionKind

func ResourceGVR

func ResourceGVR(resource *v1.APIResource) schema.GroupVersionResource

func SetSourceColorScheme

func SetSourceColorScheme(buf *gtksource.Buffer)

func YamlToJson

func YamlToJson(data []byte) ([]byte, error)

func YamlToUnstructured added in v0.2.0

func YamlToUnstructured(data []byte) (*unstructured.Unstructured, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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