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
Click to show internal directories.
Click to hide internal directories.