helper

package
v0.0.0-...-4dee700 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2016 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LogError = log.New(os.Stdout, "ERROR: ", log.Ldate|log.Ltime|log.LUTC|log.Lshortfile)

LogError the error log level

LogInfo the info log level

LogWarn the warn log level

Functions

func CacheEnvVars

func CacheEnvVars(currentEnvVars []api.EnvVar, newEnvVars []api.EnvVar) []api.EnvVar

CacheEnvVars appends a list of new env vars to a given current list without duplication

func GenerateRandomBytes

func GenerateRandomBytes(length int) ([]byte, error)

GenerateRandomBytes returns securely generated random bytes. It will return an error if the system's secure random number generator fails to function correctly, in which case the caller should not continue.

func GenerateRandomString

func GenerateRandomString(length int) (string, error)

GenerateRandomString returns a URL-safe, base64 encoded securely generated random string.

func GetPTSFromURL

func GetPTSFromURL(ptsURLString string, request *http.Request) (api.PodTemplateSpec, error)

GetPTSFromURL gets a pod template spec from a given URL

func UniqueHostNames

func UniqueHostNames(hostNames []string, client k8sClient.Client) (bool, error)

UniqueHostNames checks if the desired hostNames are unique among existing namespaces

func ValidAdmin

func ValidAdmin(organization string, w http.ResponseWriter, r *http.Request) bool

ValidAdmin checks if the user is an org admin for the organization they are making a request in

Types

This section is empty.

Jump to

Keyboard shortcuts

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