mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-09-10 10:35:51 +00:00
fc5aaef391
Add external_probe to the licensing feature enumeration, Pro tier membership, self-hosted feature catalog, feature map, upgrade matrix and pricing handoff, with the entitlement contract goldens updated. The capability is served by the community binary - the entitlement alone gates it, like relay. No existing free functionality changes: local availability checks stay ungated. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
38 lines
847 B
Go
38 lines
847 B
Go
package licensing
|
|
|
|
// DefaultFeatureKeys defines the standard feature set exposed by /api/license/features.
|
|
var DefaultFeatureKeys = []string{
|
|
FeatureAIPatrol,
|
|
FeatureAIAlerts,
|
|
FeatureAIAutoFix,
|
|
FeatureKubernetesAI,
|
|
FeatureUpdateAlerts,
|
|
FeatureAgentProfiles,
|
|
FeatureSSO,
|
|
FeatureAdvancedSSO,
|
|
FeatureRelay,
|
|
FeatureMobileApp,
|
|
FeaturePushNotifications,
|
|
FeatureLongTermMetrics,
|
|
FeatureRBAC,
|
|
FeatureAuditLogging,
|
|
FeatureAdvancedReporting,
|
|
FeatureExternalProbe,
|
|
FeatureMultiTenant,
|
|
}
|
|
|
|
// BuildFeatureMap evaluates feature availability for the given checker.
|
|
func BuildFeatureMap(checker FeatureChecker, keys []string) map[string]bool {
|
|
out := make(map[string]bool)
|
|
if checker == nil {
|
|
return out
|
|
}
|
|
if len(keys) == 0 {
|
|
keys = DefaultFeatureKeys
|
|
}
|
|
for _, key := range keys {
|
|
out[key] = checker.HasFeature(key)
|
|
}
|
|
return out
|
|
}
|