generate

package
v0.0.0-...-a729a75 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLicense

func NewLicense(info NewLicenseInfo) (string, error)

NewLicense generates a new license according to the provided request

func NewPrivateKey

func NewPrivateKey() (*rsa.PrivateKey, error)

NewPrivateKey generates and returns private key

Types

type NewLicenseInfo

type NewLicenseInfo struct {
	// ValidFor is validity period for the license
	ValidFor time.Duration
	// PrivateKey is the private key part of the license
	PrivateKey *rsa.PrivateKey
	// TLSKeyPair is the certificate authority to sign the license with
	TLSKeyPair authority.TLSKeyPair
	// Payload is the license payload
	Payload []byte
}

NewLicenseInfo encapsulates fields needed to generate a license

func (*NewLicenseInfo) Check

func (i *NewLicenseInfo) Check() error

Check checks the new license request

Jump to

Keyboard shortcuts

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