Documentation ¶
Index ¶
Constants ¶
View Source
const ( SecretPattern = `\A([a-z0-9]{16})\z` UsageSigning = "signing" UsageAuthentication = "authentication" )
Variables ¶
This section is empty.
Functions ¶
func IsValidSecret ¶
func ToSecret ¶
func ToSecret(token *BootstrapToken) *corev1.Secret
func ValidateID ¶
func ValidateSecret ¶
Types ¶
type BootstrapToken ¶
type BootstrapToken struct { ID string Secret string Description string Expires *time.Time Usages []string Groups []string }
func FromSecret ¶
func FromSecret(secret *corev1.Secret) (*BootstrapToken, error)
func Generate ¶
func Generate(template *BootstrapToken) (*BootstrapToken, error)
func (*BootstrapToken) WithTTL ¶
func (t *BootstrapToken) WithTTL(ttl time.Duration) *BootstrapToken
Click to show internal directories.
Click to hide internal directories.