utils

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2020 License: Apache-2.0 Imports: 12 Imported by: 26

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GlobalLogLevel = 0
View Source
var Log logr.Logger = logger{
	// contains filtered or unexported fields
}

Functions

func BoolPointer

func BoolPointer(b bool) *bool

BoolPointer converts bool to *bool

func Contains

func Contains(s []string, e string) bool

Contains check if a string item exists in []string

func Hash32

func Hash32(in string) (string, error)

Hash32 calculate for string

func IntPointer

func IntPointer(i int32) *int32

IntPointer converts int32 to *int32

func IntPointer64

func IntPointer64(i int64) *int64

IntPointer converts int64 to *int64

func MergeLabels

func MergeLabels(labelGroups ...map[string]string) map[string]string

MergeLabels merge into map[string]string map

func ObjectKeyFromObjectMeta added in v0.7.0

func ObjectKeyFromObjectMeta(o v1.Object) types.NamespacedName

func OrderedStringMap

func OrderedStringMap(original map[string]string) *orderedmap.OrderedMap

OrderedStringMap

func PointerToBool added in v0.11.0

func PointerToBool(b *bool) bool

func PointerToInt added in v0.11.0

func PointerToInt(i *int) int

func PointerToString added in v0.11.0

func PointerToString(s *string) string

func PointerToUint added in v0.11.0

func PointerToUint(i *uint) uint

func StringPointer

func StringPointer(s string) *string

StringPointer converts string to *string

Types

type ResourceOrder added in v0.11.0

type ResourceOrder string
const (
	InstallResourceOrder   ResourceOrder = "Install"
	UninstallResourceOrder ResourceOrder = "Uninstall"
)

type ResourceScoreFunc added in v0.11.0

type ResourceScoreFunc func(o runtime.Object) int

type RuntimeObjects added in v0.11.0

type RuntimeObjects []runtime.Object

func (RuntimeObjects) InstallObjectOrder added in v0.11.0

func (os RuntimeObjects) InstallObjectOrder() func(o runtime.Object) int

func (RuntimeObjects) Sort added in v0.11.0

func (os RuntimeObjects) Sort(order ResourceOrder)

func (RuntimeObjects) UninstallObjectOrder added in v0.11.0

func (os RuntimeObjects) UninstallObjectOrder() func(o runtime.Object) int

Jump to

Keyboard shortcuts

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