Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateKeyPair ¶
GenerateKeyPair generates a new key pair for license signing
Types ¶
type License ¶
type License struct {
PluginName string `json:"plugin_name"`
CustomerID string `json:"customer_id"`
IssuedAt time.Time `json:"issued_at"`
ExpiresAt time.Time `json:"expires_at"`
Features []string `json:"features"`
MaxUsers int `json:"max_users,omitempty"`
Signature string `json:"signature"`
}
License represents a plugin license
type LicenseValidator ¶
type LicenseValidator struct {
// contains filtered or unexported fields
}
LicenseValidator validates plugin licenses
func NewLicenseValidator ¶
func NewLicenseValidator(publicKeyBase64, cacheDir string) (*LicenseValidator, error)
NewLicenseValidator creates a new license validator
func (*LicenseValidator) IsLicenseValid ¶
func (lv *LicenseValidator) IsLicenseValid(pluginName string) (bool, error)
IsLicenseValid checks if a license is valid for a plugin
func (*LicenseValidator) ValidateCachedLicense ¶
func (lv *LicenseValidator) ValidateCachedLicense(pluginName string) (*License, error)
ValidateCachedLicense validates a license from cache
func (*LicenseValidator) ValidateLicense ¶
func (lv *LicenseValidator) ValidateLicense(licensePath string) (*License, error)
ValidateLicense validates a license file
Click to show internal directories.
Click to hide internal directories.