Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidSignature indicates the license signature is invalid. ErrInvalidSignature = errors.New("Invalid signature") // ErrMalformedLicense indicates the license file is malformed. ErrMalformedLicense = errors.New("Malformed License") )
Functions ¶
This section is empty.
Types ¶
type License ¶
type License struct { Iss string `json:"iss,omitempty"` // Issued By Cus string `json:"cus,omitempty"` // Customer ID Sub string `json:"sub,omitempty"` // Subscriber ID Typ string `json:"typ,omitempty"` // License Type Lim int `json:"lim,omitempty"` // License Limit (e.g. Seats) Iat time.Time `json:"iat,omitempty"` // Issued At Exp time.Time `json:"exp,omitempty"` // Expires At Dat json.RawMessage `json:"dat,omitempty"` // Metadata }
License defines a software license key.
func Decode ¶
Decode decodes the PEM encoded license key and verifies the content signature using the ed25519 public key.
func DecodeFile ¶
DecodeFile decodes the PEM encoded license file and verifies the content signature using the ed25519 public key.
Click to show internal directories.
Click to hide internal directories.