signature

package
v0.0.0-...-9db14f5 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AlwaysExcluded = []string{
	".status",
	".metadata.creationTimestamp",
	".metadata.annotations",
}

AlwaysExcluded are fields we always exclude from signature generation.

View Source
var GojqTemplate = template.Must(template.New("gojq_query").Funcs(
	template.FuncMap{
		"StringsJoin": strings.Join,
		"Escape": func(in string) string {

			return strings.ReplaceAll(in, ".", "\\\\.")
		},
	},
).Parse(`
del({{ StringsJoin .Excludes ", " }})
`))

GojqTemplate is used to build a gojq filter expression that deletes the desired fields.

Functions

func GetBundleSignature

func GetBundleSignature(ctx context.Context, bundle *anywherev1alpha1.Bundles, key string) (string, error)

GetBundleSignature calls KMS and retrieves a signature, then base64-encodes it to store in the Bundles manifest annotation.

Types

This section is empty.

Jump to

Keyboard shortcuts

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