utils

package
v0.0.0-...-d0d6462 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BoolValue

func BoolValue(flag string) bool

BoolValue converts string value to bool

func ContainsString

func ContainsString(slice []string, s string) bool

ContainsString Helper functions to check from a slice of strings.

func PrepareK8sRestConfigFromClusterCR

func PrepareK8sRestConfigFromClusterCR(ctx context.Context, cr *v1alpha1.Cluster, secret *v1.Secret) (*rest.Config, error)

PrepareK8sRestConfigFromClusterCR

func RemoveString

func RemoveString(slice []string, s string) (result []string)

RemoveString Helper function to check remove string

func SanitizeName

func SanitizeName(name string) string

SanitizeName sanitizes the string name based on K8s naming convention.

func StopIfError

func StopIfError(err error)

StopIfError is a convenient function to stop processing if there is any error

func Token

func Token(secret *v1.Secret)

Token function provides the latest token from the list of tokens

Types

This section is empty.

Jump to

Keyboard shortcuts

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