2019-11-01 14:56:12 +01:00
|
|
|
package models
|
|
|
|
|
|
|
|
|
|
type Licensing interface {
|
|
|
|
|
// HasValidLicense is true if a valid license exists
|
|
|
|
|
HasValidLicense() bool
|
|
|
|
|
|
|
|
|
|
// HasLicense is true if there is a license provided
|
|
|
|
|
HasLicense() bool
|
|
|
|
|
|
|
|
|
|
// Expiry returns the unix epoch timestamp when the license expires, or 0 if no valid license is provided
|
|
|
|
|
Expiry() int64
|
2020-01-27 09:24:44 +01:00
|
|
|
|
|
|
|
|
// Return edition
|
|
|
|
|
Edition() string
|
|
|
|
|
|
2021-02-01 10:13:09 +01:00
|
|
|
// Used to build content delivery URL
|
|
|
|
|
ContentDeliveryPrefix() string
|
|
|
|
|
|
2021-10-05 14:54:26 +01:00
|
|
|
LicenseURL(showAdminLicensingPage bool) string
|
2020-01-27 09:24:44 +01:00
|
|
|
|
|
|
|
|
StateInfo() string
|
2021-01-18 14:42:39 +01:00
|
|
|
}
|
2020-07-01 13:02:53 -04:00
|
|
|
|
2021-01-18 14:42:39 +01:00
|
|
|
type LicenseEnvironment interface {
|
|
|
|
|
// Environment is a map of environment variables
|
|
|
|
|
Environment() map[string]string
|
2019-11-01 14:56:12 +01:00
|
|
|
}
|