util

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2022 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version semver.Version
)

Functions

func GetEnvDuration

func GetEnvDuration(key string, def time.Duration) time.Duration

func GetEnvInt added in v0.0.69

func GetEnvInt(key string, def int) int

func GetEnvStringArr added in v0.0.89

func GetEnvStringArr(key string, def []string) []string

func GetFuncName added in v0.0.56

func GetFuncName(i interface{}) string

func GetSourceUID added in v0.0.95

func GetSourceUID(cluster, namespace, pipelineName, stepName, sourceName string) string

func IgnoreAlreadyExists

func IgnoreAlreadyExists(err error) error

func IgnoreConflict

func IgnoreConflict(err error) error

func IgnoreContainerNotFound

func IgnoreContainerNotFound(err error) error

func IgnoreExist

func IgnoreExist(err error) error

func IgnoreNotFound

func IgnoreNotFound(err error) error

func IgnorePermission

func IgnorePermission(err error) error

func IsPrint

func IsPrint(x string) bool

func MustHash

func MustHash(v interface{}) string

func MustJSON

func MustJSON(in interface{}) string

func MustUnJSON

func MustUnJSON(v interface{}, in interface{})

MustUnJSON unmarshalls JSON or panics. v - must be []byte or string in - must be a pointer.

func NewLogger added in v0.0.38

func NewLogger() logr.Logger

func NotEqual

func NotEqual(a, b interface{}) (notEqual bool, patch string)

func Printable

func Printable(x string) string

return a printable string.

func RandString added in v0.0.30

func RandString() string

func ReadFile

func ReadFile(filename string) (*unstructured.UnstructuredList, error)

func Resource

func Resource(kind string) string

func SplitYAML

func SplitYAML(v interface{}) (*unstructured.UnstructuredList, error)

Types

type FileInfoUnstructuredList

type FileInfoUnstructuredList struct {
	fs.FileInfo
	unstructured.UnstructuredList
}

func ReadDir

func ReadDir(dirname string) ([]FileInfoUnstructuredList, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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