{"modulePath":"github.com/UnityTech/client-go","version":"v9.0.0+incompatible","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package util\n\n## Variables\n\n```go\nvar (\n\t// BootstrapTokenRegexp is a compiled regular expression of TokenRegexpString\n\tBootstrapTokenRegexp = regexp.MustCompile(api.BootstrapTokenPattern)\n\t// BootstrapTokenIDRegexp is a compiled regular expression of TokenIDRegexpString\n\tBootstrapTokenIDRegexp = regexp.MustCompile(api.BootstrapTokenIDPattern)\n\t// BootstrapGroupRegexp is a compiled regular expression of BootstrapGroupPattern\n\tBootstrapGroupRegexp = regexp.MustCompile(api.BootstrapGroupPattern)\n)\n```\n\n## Functions\n\n```go\nfunc BootstrapTokenSecretName(tokenID string) string\n```\nBootstrapTokenSecretName returns the expected name for the Secret storing the Bootstrap Token in the Kubernetes API.\n\n```go\nfunc GenerateBootstrapToken() (string, error)\n```\nGenerateBootstrapToken generates a new, random Bootstrap Token.\n\n```go\nfunc IsValidBootstrapToken(token string) bool\n```\nIsValidBootstrapToken returns whether the given string is valid as a Bootstrap Token and in other words satisfies the BootstrapTokenRegexp\n\n```go\nfunc IsValidBootstrapTokenID(tokenID string) bool\n```\nIsValidBootstrapTokenID returns whether the given string is valid as a Bootstrap Token ID and in other words satisfies the BootstrapTokenIDRegexp\n\n```go\nfunc TokenFromIDAndSecret(id, secret string) string\n```\nTokenFromIDAndSecret returns the full token which is of the form \"{id}.{secret}\"\n\n```go\nfunc ValidateBootstrapGroupName(name string) error\n```\nValidateBootstrapGroupName checks if the provided group name is a valid bootstrap group name. Returns nil if valid or a validation error if invalid.\n\n```go\nfunc ValidateUsages(usages []string) error\n```\nValidateUsages validates that the passed in string are valid usage strings for bootstrap tokens.\n\n","path":"github.com/UnityTech/client-go/tools/bootstrap/token/util","name":"util","synopsis":"","isRedistributable":true}
