licensing

package
v0.0.0-...-fb7f86c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 18, 2023 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ActionRead        = "licensing:read"
	ActionUpdate      = "licensing:write"
	ActionDelete      = "licensing:delete"
	ActionReportsRead = "licensing.reports:read"
)

Variables

PageAccess defines permissions that grant access to the licensing and stats page

Functions

This section is empty.

Types

type LicenseEnvironment

type LicenseEnvironment interface {
	// Environment is a map of environment variables
	Environment() map[string]string
}

type 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 OSSLicensingService

type OSSLicensingService struct {
	Cfg          *setting.Cfg
	HooksService *hooks.HooksService
}

func ProvideService

func ProvideService(cfg *setting.Cfg, hooksService *hooks.HooksService) *OSSLicensingService

func (*OSSLicensingService) ContentDeliveryPrefix

func (*OSSLicensingService) ContentDeliveryPrefix() string

func (*OSSLicensingService) Edition

func (*OSSLicensingService) Edition() string

func (*OSSLicensingService) EnabledFeatures

func (*OSSLicensingService) EnabledFeatures() map[string]bool

func (*OSSLicensingService) Expiry

func (*OSSLicensingService) Expiry() int64

func (*OSSLicensingService) FeatureEnabled

func (*OSSLicensingService) FeatureEnabled(feature string) bool

func (*OSSLicensingService) LicenseURL

func (l *OSSLicensingService) LicenseURL(showAdminLicensingPage bool) string

func (*OSSLicensingService) StateInfo

func (*OSSLicensingService) StateInfo() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL