bootstraptoken

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SecretPattern = `\A([a-z0-9]{16})\z`

	UsageSigning        = "signing"
	UsageAuthentication = "authentication"
)

Variables

This section is empty.

Functions

func IsValidID

func IsValidID(id string) bool

func IsValidSecret

func IsValidSecret(secret string) bool

func ToSecret

func ToSecret(token *BootstrapToken) *corev1.Secret

func ValidateID

func ValidateID(id string) error

func ValidateSecret

func ValidateSecret(secret string) error

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

Jump to

Keyboard shortcuts

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