Documentation
¶
Overview ¶
Package to handle the licensing status of a client.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewNilSubscriptionType ¶
func NewNilSubscriptionType() *nilSubscriptionType
Types ¶
type ConfigManager ¶
type ConfigManager interface {
// GetConfig returns the current config, i.e., the ecrpyted key/passphrase pair.
GetConfig() *stnrv1.LicenseConfig
// Reconcile updates the the licensing status, i.e., the licensed feature-set and the
// subscription type, based in an ecrpyted key/passphrase pair.
Reconcile(config *stnrv1.LicenseConfig)
// Validate checks whether a client is entitled to use a feature.
Validate(feature Feature) bool
// SubscriptionType returns the current subscription type (e.g., free, member, enterprise).
SubscriptionType() SubscriptionType
// Status returns the current licensing status.
Status() string
}
Manager is a genetic API for negotiating licensing status.
func New ¶
func New(log logging.LeveledLogger) ConfigManager
New creares a new license config manager.
func NewStub ¶
func NewStub(log logging.LeveledLogger) ConfigManager
type Stub ¶
type Stub struct {
// contains filtered or unexported fields
}
Stub is the default license manager that implements the free/open-source tier.
func (*Stub) GetConfig ¶
func (m *Stub) GetConfig() *stnrv1.LicenseConfig
func (*Stub) Reconcile ¶
func (s *Stub) Reconcile(config *stnrv1.LicenseConfig)
func (*Stub) SubscriptionType ¶
func (m *Stub) SubscriptionType() SubscriptionType
type SubscriptionType ¶
SubscriptionType is the current subscription type.
Click to show internal directories.
Click to hide internal directories.