license

package
v0.0.0-...-98ac406 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EntitlementNameRegexp *regexp.Regexp
View Source
var GrantStringRegexp *regexp.Regexp

Functions

func FlagToNotAfter

func FlagToNotAfter(flag string, license *License) error

func FlagToNotBefore

func FlagToNotBefore(flag string, license *License) error

func FlagsToGrants

func FlagsToGrants(flags []string, license *License) error

func FlagsToMetadata

func FlagsToMetadata(flags []string, license *License) error

func Generate

func Generate(key *rsa.PrivateKey, license License) (string, error)

Types

type License

type License struct {
	Id        string            `json:"id"`
	Licensee  string            `json:"licensee"`
	Metadata  map[string]string `json:"metadata"`
	Grants    map[string]int    `json:"grants"`
	NotBefore time.Time         `json:"notBefore"`
	NotAfter  time.Time         `json:"notAfter"`
}

func Validate

func Validate(licenseBytes []byte) (*License, error)

func ValidateSecret

func ValidateSecret(secret *corev1.Secret) (*License, error)

Jump to

Keyboard shortcuts

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