grafana/pkg/models/licensing.go
Emil Tullstedt af27dd7e7d
Licensing: Send map of environment variables to plugins (#30347)
Replace hard-coded `GF_ENTERPRISE_LICENSE_TEXT` with a
`map[string]string` to allow the licensing service to allow sending any
environment variable through to the plugins for licensing purposes.
2021-01-18 14:42:39 +01:00

25 lines
542 B
Go

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
// Return edition
Edition() string
LicenseURL(user *SignedInUser) string
StateInfo() string
}
type LicenseEnvironment interface {
// Environment is a map of environment variables
Environment() map[string]string
}