chore: move models/licensing into licensing service (#61878)

This commit is contained in:
Kristin Laemmert
2023-01-23 11:53:43 -05:00
committed by GitHub
parent 50faeba07e
commit 857649e30b
13 changed files with 39 additions and 36 deletions
+2 -2
View File
@@ -3,10 +3,10 @@ package licensingtest
import (
"github.com/stretchr/testify/mock"
"github.com/grafana/grafana/pkg/models"
"github.com/grafana/grafana/pkg/services/licensing"
)
var _ models.Licensing = new(FakeLicensing)
var _ licensing.Licensing = new(FakeLicensing)
func NewFakeLicensing() *FakeLicensing {
return &FakeLicensing{&mock.Mock{}}
+25
View File
@@ -0,0 +1,25 @@
package licensing
type Licensing interface {
// Expiry returns the unix epoch timestamp when the license expires, or 0 if no valid license is provided
Expiry() int64
// Return edition
Edition() string
// Used to build content delivery URL
ContentDeliveryPrefix() string
LicenseURL(showAdminLicensingPage bool) string
StateInfo() string
EnabledFeatures() map[string]bool
FeatureEnabled(feature string) bool
}
type LicenseEnvironment interface {
// Environment is a map of environment variables
Environment() map[string]string
}