Documentation ¶
Index ¶
- Variables
- func Contains[T Comparable[T]](s []T, e T) bool
- func GetCertFromSecret(namespace, secret string) (cert tls.Certificate, cp *x509.CertPool, err error)
- func GetParamOrHeader(httpReq *http.Request, keys ...string) string
- func GetSvcAccountToken(namespace, svcAccount string) (string, error)
- func ResolveFlag(curr, envVar, def string) string
- func ResolveFlagBool(curr bool, envVar string, def bool) bool
- func SystemNamespace(platform, system string) string
- type Comparable
Constants ¶
This section is empty.
Variables ¶
View Source
var ( HashRegexp = regexp.MustCompile(`^[0-9a-f]{7}$`) ImageRegexp = regexp.MustCompile(`^.*:[a-z0-9-]{7}$`) // TODO use SHA256, switch pattern to ^.*@sha256:[a-z0-9]{64}$ NameRegexp = regexp.MustCompile(`^[a-z0-9][a-z0-9-]{0,28}[a-z0-9]$`) TagOrBranchRegexp = regexp.MustCompile(`^[a-z0-9][a-z0-9-\\.]{0,28}[a-z0-9]$`) UUIDRegexp = regexp.MustCompile(`^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$`) )
Functions ¶
func Contains ¶
func Contains[T Comparable[T]](s []T, e T) bool
func GetCertFromSecret ¶
func GetParamOrHeader ¶
GetParamOrHeader looks for query parameters and headers for the provided keys. Keys are checked in order. Query parameters take precedence over headers.
func GetSvcAccountToken ¶
func ResolveFlag ¶
func SystemNamespace ¶
SystemNamespace returns the name of the Kubernetes Namespace that contains all System objects. The format is 'kfs-{Instance}-{System}'. The 'kfs' prefix stands for 'KubeFox System'.
If any arg is empty an empty string is returned.
Types ¶
type Comparable ¶
Click to show internal directories.
Click to hide internal directories.