2019-11-01 08:56:12 -05: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 02:24:44 -06:00
|
|
|
|
|
|
|
// Return edition
|
|
|
|
Edition() string
|
|
|
|
|
2021-02-01 03:13:09 -06:00
|
|
|
// Used to build content delivery URL
|
|
|
|
ContentDeliveryPrefix() string
|
|
|
|
|
2020-01-27 02:24:44 -06:00
|
|
|
LicenseURL(user *SignedInUser) string
|
|
|
|
|
|
|
|
StateInfo() string
|
2021-01-18 07:42:39 -06:00
|
|
|
}
|
2020-07-01 12:02:53 -05:00
|
|
|
|
2021-01-18 07:42:39 -06:00
|
|
|
type LicenseEnvironment interface {
|
|
|
|
// Environment is a map of environment variables
|
|
|
|
Environment() map[string]string
|
2019-11-01 08:56:12 -05:00
|
|
|
}
|