utils

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2021 License: Apache-2.0 Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HashWithPrefix added in v1.0.0

func HashWithPrefix(prefix, name string) string

HashWithPrefix encapsulates K8S resource name creator.

func HashedName added in v1.0.0

func HashedName(name string) string

HashedName returns md5 sum truncated to 6 alphanumeric characters and converted to lowercase. The motivation behind is to render K8S resource definition's name with constant length deterministic string.

func New16ID

func New16ID() []byte

New16ID is a globally unique identifier. It is a [A-Z0-9] string 16 characters long. It is a UUID version 4 Guid that is zbased32 encoded with the padding stripped off.

func New28ID

func New28ID() []byte

New28ID is a globally unique identifier. It is a [A-Z0-9] string 28 characters long. It is a UUID version 4 Guid that is zbased32 encoded with the padding stripped off.

Types

This section is empty.

Jump to

Keyboard shortcuts

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