utils

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2024 License: Apache-2.0 Imports: 18 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareSnowflakeSequenceIDs added in v0.15.0

func CompareSnowflakeSequenceIDs(last, current string) (bool, error)

CompareSnowflakeSequenceIDs compares two snowflake sequence IDs. Returns true if the current ID is greater than the last. If the last sequence ID is empty, then the current is greater.

func Encode added in v0.15.0

func Encode(work *workv1.ManifestWork) error

Encode ensures the given work's manifests are encoded

func ListWorksWithOptions added in v0.14.0

func ListWorksWithOptions(store cache.Store, namespace string, opts metav1.ListOptions) ([]*workv1.ManifestWork, error)

ListWorksWithOptions retrieves the manifestworks from store which matches the options.

func Patch

func Patch(patchType types.PatchType, work *workv1.ManifestWork, patchData []byte) (*workv1.ManifestWork, error)

Patch applies the patch to a work with the patch type.

func UID added in v0.14.0

func UID(sourceID, namespace, name string) string

UID returns a v5 UUID based on sourceID, work name and namespace to make sure it is consistent

func Validate added in v0.14.0

func Validate(work *workv1.ManifestWork) field.ErrorList

Types

This section is empty.

Jump to

Keyboard shortcuts

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