Versions in this module Expand all Collapse all v1 v1.5.0 Apr 2, 2026 v0 v0.1.0 Apr 6, 2026 Changes in this version + type FeatureFlag struct + Enabled bool + Name string + Tenant string + type FeatureFlagManager struct + func NewFeatureFlagManager() *FeatureFlagManager + func (m *FeatureFlagManager) IsEnabled(name, tenant string) bool + func (m *FeatureFlagManager) List() []*FeatureFlag + func (m *FeatureFlagManager) Set(name string, enabled bool, tenant string) + type Permission struct + Action string + Resource string + type RBACManager struct + func NewRBACManager() *RBACManager + func (m *RBACManager) AssignRole(userID string, role RBACRole) + func (m *RBACManager) CheckPermission(userID, resource, action string) bool + type RBACRole string + const RoleAdmin + const RoleUser + const RoleViewer + type Tenant struct + CreatedAt time.Time + Features []string + ID string + Name string + Plan string + Quota int + Used int + type TenantManager struct + func NewTenantManager(db *sql.DB) *TenantManager + func (tm *TenantManager) Create(tenant *Tenant) error + func (tm *TenantManager) Get(id string) *Tenant + func (tm *TenantManager) HasFeature(id, feature string) bool + func (tm *TenantManager) Init() error + func (tm *TenantManager) IsWithinQuota(id string) bool + func (tm *TenantManager) List() []*Tenant + func (tm *TenantManager) RecordUsage(id string, tokens int)