k8sutils

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2018 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanupPatchAnnotations

func CleanupPatchAnnotations(patch []byte, name string) ([]byte, error)

CleanupPatchAnnotations cleans up a patch diff to remove the kubekit annotations. This is useful for when a patch is applied and we don't want to print the annotations but just the actual diff.

func JSONBytes

func JSONBytes(val interface{}) []byte

JSONBytes converts an interface value to a set of bytes encoded as JSON.

func PtrBool

func PtrBool(b bool) *bool

PtrBool converts a boolean value to a pointer of that boolean value.

func PtrInt64

func PtrInt64(i int64) *int64

PtrInt64 converts a value of int64 to the pointer of that value.

func PtrIntOrString

func PtrIntOrString(i intstr.IntOrString) *intstr.IntOrString

PtrIntOrString converts a value of the intstr.IntOrString value to a pointer of that value.

func PtrString

func PtrString(s string) *string

PtrString converts a value of string to the pointer of that value.

func RandomString

func RandomString(n int) string

RandomString will return a string of length n with random characters.

func ShortHash

func ShortHash(data string, len int) string

ShortHash creates a shortened hash from the given string. The hash is lowercase base32 encoded, suitable for DNS use, and at most "len" characters long.

Types

This section is empty.

Jump to

Keyboard shortcuts

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