client-go: k8s.io/client-go/tools/bootstrap/token/util Index | Files

package util

import "k8s.io/client-go/tools/bootstrap/token/util"

Index

Package Files

helpers.go

Variables

var (
    // BootstrapTokenRegexp is a compiled regular expression of TokenRegexpString
    BootstrapTokenRegexp = regexp.MustCompile(api.BootstrapTokenPattern)
    // BootstrapTokenIDRegexp is a compiled regular expression of TokenIDRegexpString
    BootstrapTokenIDRegexp = regexp.MustCompile(api.BootstrapTokenIDPattern)
    // BootstrapGroupRegexp is a compiled regular expression of BootstrapGroupPattern
    BootstrapGroupRegexp = regexp.MustCompile(api.BootstrapGroupPattern)
)

func BootstrapTokenSecretName Uses

func BootstrapTokenSecretName(tokenID string) string

BootstrapTokenSecretName returns the expected name for the Secret storing the Bootstrap Token in the Kubernetes API.

func GenerateBootstrapToken Uses

func GenerateBootstrapToken() (string, error)

GenerateBootstrapToken generates a new, random Bootstrap Token.

func IsValidBootstrapToken Uses

func IsValidBootstrapToken(token string) bool

IsValidBootstrapToken returns whether the given string is valid as a Bootstrap Token and in other words satisfies the BootstrapTokenRegexp

func IsValidBootstrapTokenID Uses

func IsValidBootstrapTokenID(tokenID string) bool

IsValidBootstrapTokenID returns whether the given string is valid as a Bootstrap Token ID and in other words satisfies the BootstrapTokenIDRegexp

func TokenFromIDAndSecret Uses

func TokenFromIDAndSecret(id, secret string) string

TokenFromIDAndSecret returns the full token which is of the form "{id}.{secret}"

func ValidateBootstrapGroupName Uses

func ValidateBootstrapGroupName(name string) error

ValidateBootstrapGroupName checks if the provided group name is a valid bootstrap group name. Returns nil if valid or a validation error if invalid.

func ValidateUsages Uses

func ValidateUsages(usages []string) error

ValidateUsages validates that the passed in string are valid usage strings for bootstrap tokens.

Package util imports 7 packages (graph) and is imported by 14 packages. Updated 2018-06-18. Refresh now. Tools for package owners.