Documentation
ΒΆ
Index ΒΆ
- Constants
- type CacheConfig
- type Config
- type EngineConfig
- type Handler
- func (h *Handler) CreateAction(c forge.Context) error
- func (h *Handler) CreateNamespace(c forge.Context) error
- func (h *Handler) CreatePolicy(c forge.Context) error
- func (h *Handler) CreateResource(c forge.Context) error
- func (h *Handler) DeleteAction(c forge.Context) error
- func (h *Handler) DeleteNamespace(c forge.Context) error
- func (h *Handler) DeletePolicy(c forge.Context) error
- func (h *Handler) DeleteResource(c forge.Context) error
- func (h *Handler) Evaluate(c forge.Context) error
- func (h *Handler) EvaluateBatch(c forge.Context) error
- func (h *Handler) GetAnalytics(c forge.Context) error
- func (h *Handler) GetAuditLog(c forge.Context) error
- func (h *Handler) GetMigrationStatus(c forge.Context) error
- func (h *Handler) GetNamespace(c forge.Context) error
- func (h *Handler) GetPolicy(c forge.Context) error
- func (h *Handler) GetResource(c forge.Context) error
- func (h *Handler) GetTemplate(c forge.Context) error
- func (h *Handler) InstantiateTemplate(c forge.Context) error
- func (h *Handler) ListActions(c forge.Context) error
- func (h *Handler) ListNamespaces(c forge.Context) error
- func (h *Handler) ListPolicies(c forge.Context) error
- func (h *Handler) ListResources(c forge.Context) error
- func (h *Handler) ListTemplates(c forge.Context) error
- func (h *Handler) MigrateFromRBAC(c forge.Context) error
- func (h *Handler) TestPolicy(c forge.Context) error
- func (h *Handler) UpdateNamespace(c forge.Context) error
- func (h *Handler) UpdatePolicy(c forge.Context) error
- func (h *Handler) ValidatePolicy(c forge.Context) error
- type MessageResponse
- type MigrationConfig
- type OrgConfig
- type PerformanceConfig
- type Plugin
- func (p *Plugin) Description() string
- func (p *Plugin) Health(ctx context.Context) error
- func (p *Plugin) ID() string
- func (p *Plugin) Init(auth interface{}) error
- func (p *Plugin) Migrate(ctx context.Context) error
- func (p *Plugin) Name() string
- func (p *Plugin) RegisterHooks(hooks interface{}) error
- func (p *Plugin) RegisterRoutes(router forge.Router) error
- func (p *Plugin) Service() *Service
- func (p *Plugin) Shutdown(ctx context.Context) error
- func (p *Plugin) Version() string
- type Service
- func (s *Service) CreateAction(ctx context.Context, appID xid.ID, orgID *xid.ID, ...) (*core.ActionDefinition, error)
- func (s *Service) CreateDefaultNamespace(ctx context.Context, appID xid.ID, orgID *xid.ID) error
- func (s *Service) CreateNamespace(ctx context.Context, appID xid.ID, orgID *xid.ID, userID xid.ID, ...) (*core.Namespace, error)
- func (s *Service) CreatePolicy(ctx context.Context, appID xid.ID, orgID *xid.ID, userID xid.ID, ...) (*core.Policy, error)
- func (s *Service) CreateResource(ctx context.Context, appID xid.ID, orgID *xid.ID, ...) (*core.ResourceDefinition, error)
- func (s *Service) DeleteAction(ctx context.Context, appID xid.ID, orgID *xid.ID, actionID xid.ID) error
- func (s *Service) DeleteNamespace(ctx context.Context, appID xid.ID, orgID *xid.ID, namespaceID xid.ID) error
- func (s *Service) DeletePolicy(ctx context.Context, appID xid.ID, orgID *xid.ID, policyID xid.ID) error
- func (s *Service) DeleteResource(ctx context.Context, appID xid.ID, orgID *xid.ID, resourceID xid.ID) error
- func (s *Service) Evaluate(ctx context.Context, appID xid.ID, orgID *xid.ID, userID xid.ID, ...) (*engine.Decision, error)
- func (s *Service) EvaluateBatch(ctx context.Context, appID xid.ID, orgID *xid.ID, userID xid.ID, ...) ([]*handlers.BatchEvaluationResult, error)
- func (s *Service) GetAnalytics(ctx context.Context, appID xid.ID, orgID *xid.ID, ...) (*handlers.AnalyticsSummary, error)
- func (s *Service) GetMigrationStatus(ctx context.Context, appID xid.ID, orgID *xid.ID) (*core.MigrationStatus, error)
- func (s *Service) GetNamespace(ctx context.Context, appID xid.ID, orgID *xid.ID, namespaceID xid.ID) (*core.Namespace, error)
- func (s *Service) GetPolicy(ctx context.Context, appID xid.ID, orgID *xid.ID, policyID xid.ID) (*core.Policy, error)
- func (s *Service) GetResource(ctx context.Context, appID xid.ID, orgID *xid.ID, resourceID xid.ID) (*core.ResourceDefinition, error)
- func (s *Service) GetTemplate(ctx context.Context, templateID string) (*core.PolicyTemplate, error)
- func (s *Service) Health(ctx context.Context) error
- func (s *Service) InstantiateTemplate(ctx context.Context, appID xid.ID, orgID *xid.ID, userID xid.ID, ...) (*core.Policy, error)
- func (s *Service) InvalidateAppCache(ctx context.Context, appID xid.ID) error
- func (s *Service) InvalidateOrganizationCache(ctx context.Context, appID xid.ID, orgID xid.ID) error
- func (s *Service) InvalidateUserCache(ctx context.Context, userID xid.ID) error
- func (s *Service) ListActions(ctx context.Context, appID xid.ID, orgID *xid.ID, namespaceID xid.ID) ([]*core.ActionDefinition, error)
- func (s *Service) ListAuditEvents(ctx context.Context, appID xid.ID, orgID *xid.ID, ...) ([]*core.AuditEvent, int, error)
- func (s *Service) ListNamespaces(ctx context.Context, appID xid.ID, orgID *xid.ID) ([]*core.Namespace, error)
- func (s *Service) ListPolicies(ctx context.Context, appID xid.ID, orgID *xid.ID, ...) ([]*core.Policy, int, error)
- func (s *Service) ListResources(ctx context.Context, appID xid.ID, orgID *xid.ID, namespaceID xid.ID) ([]*core.ResourceDefinition, error)
- func (s *Service) ListTemplates(ctx context.Context) ([]*core.PolicyTemplate, error)
- func (s *Service) Migrate(ctx context.Context) error
- func (s *Service) MigrateFromRBAC(ctx context.Context, appID xid.ID, orgID *xid.ID, ...) (*core.MigrationStatus, error)
- func (s *Service) Shutdown(ctx context.Context) error
- func (s *Service) TestPolicy(ctx context.Context, req *handlers.TestPolicyRequest) (*handlers.TestPolicyResponse, error)
- func (s *Service) UpdateNamespace(ctx context.Context, appID xid.ID, orgID *xid.ID, namespaceID xid.ID, ...) (*core.Namespace, error)
- func (s *Service) UpdatePolicy(ctx context.Context, appID xid.ID, orgID *xid.ID, userID xid.ID, ...) (*core.Policy, error)
- func (s *Service) ValidatePolicy(ctx context.Context, req *handlers.ValidatePolicyRequest) (*handlers.ValidatePolicyResponse, error)
- type StatusResponse
Constants ΒΆ
const ( PluginID = "permissions" PluginName = "Advanced Permissions" PluginVersion = "1.0.0" )
Variables ΒΆ
This section is empty.
Functions ΒΆ
This section is empty.
Types ΒΆ
type CacheConfig ΒΆ
type CacheConfig struct {
// Enabled controls whether caching is active
// Default: true
Enabled bool `json:"enabled" yaml:"enabled"`
// Backend specifies the cache backend
// Options: "memory", "redis", "hybrid"
// Default: "hybrid"
Backend string `json:"backend" yaml:"backend"`
// LocalCacheSize is the size of the in-memory LRU cache
// Default: 10000
LocalCacheSize int `json:"localCacheSize" yaml:"localCacheSize"`
// LocalCacheTTL is the TTL for local cache entries
// Default: 5 minutes
LocalCacheTTL time.Duration `json:"localCacheTTL" yaml:"localCacheTTL"`
// RedisTTL is the TTL for Redis cache entries
// Default: 15 minutes
RedisTTL time.Duration `json:"redisTTL" yaml:"redisTTL"`
// WarmupOnStart pre-loads policies on startup
// Default: true
WarmupOnStart bool `json:"warmupOnStart" yaml:"warmupOnStart"`
// InvalidateOnChange immediately invalidates cache on policy changes
// Default: true
InvalidateOnChange bool `json:"invalidateOnChange" yaml:"invalidateOnChange"`
}
CacheConfig controls caching behavior
type Config ΒΆ
type Config struct {
// Enabled controls whether the permissions system is active
Enabled bool `json:"enabled" yaml:"enabled"`
// Mode determines the evaluation mode
// - "strict": Only use permissions system (RBAC disabled)
// - "hybrid": Try permissions first, fallback to RBAC
// - "rbac-primary": Try RBAC first, fallback to permissions
Mode string `json:"mode" yaml:"mode"`
// Engine configuration
Engine EngineConfig `json:"engine" yaml:"engine"`
// Cache configuration
Cache CacheConfig `json:"cache" yaml:"cache"`
// Performance tuning
Performance PerformanceConfig `json:"performance" yaml:"performance"`
// Migration settings
Migration MigrationConfig `json:"migration" yaml:"migration"`
// Organization-specific overrides
Organizations map[string]*OrgConfig `json:"organizations" yaml:"organizations"`
}
Config represents the permissions plugin configuration
func LoadConfig ΒΆ
func LoadConfig(configManager forge.ConfigManager) (*Config, error)
LoadConfig loads configuration from Forge config manager
func (*Config) GetOrgConfig ΒΆ
GetOrgConfig returns the effective configuration for an organization
func (*Config) MergeOrgConfig ΒΆ
MergeOrgConfig merges organization-specific settings
type EngineConfig ΒΆ
type EngineConfig struct {
// MaxPolicyComplexity limits the number of operations in a policy
// Default: 100
MaxPolicyComplexity int `json:"maxPolicyComplexity" yaml:"maxPolicyComplexity"`
// EvaluationTimeout is the maximum time for policy evaluation
// Default: 10ms
EvaluationTimeout time.Duration `json:"evaluationTimeout" yaml:"evaluationTimeout"`
// MaxPoliciesPerOrg limits policies per organization
// Default: 10000
MaxPoliciesPerOrg int `json:"maxPoliciesPerOrg" yaml:"maxPoliciesPerOrg"`
// ParallelEvaluation enables concurrent policy evaluation
// Default: true
ParallelEvaluation bool `json:"parallelEvaluation" yaml:"parallelEvaluation"`
// MaxParallelEvaluations controls concurrency level
// Default: 4
MaxParallelEvaluations int `json:"maxParallelEvaluations" yaml:"maxParallelEvaluations"`
// EnableAttributeCaching caches attribute lookups
// Default: true
EnableAttributeCaching bool `json:"enableAttributeCaching" yaml:"enableAttributeCaching"`
// AttributeCacheTTL is the TTL for attribute cache
// Default: 5 minutes
AttributeCacheTTL time.Duration `json:"attributeCacheTTL" yaml:"attributeCacheTTL"`
}
EngineConfig controls the policy evaluation engine
type Handler ΒΆ
type Handler struct {
// contains filtered or unexported fields
}
Handler handles HTTP requests for the permissions plugin Updated for V2 architecture: App β Environment β Organization
func NewHandler ΒΆ
NewHandler creates a new handler instance
func (*Handler) CreateAction ΒΆ
CreateAction handles POST /api/permissions/actions
func (*Handler) CreateNamespace ΒΆ
CreateNamespace handles POST /api/permissions/namespaces
func (*Handler) CreatePolicy ΒΆ
CreatePolicy handles POST /api/permissions/policies
func (*Handler) CreateResource ΒΆ
CreateResource handles POST /api/permissions/resources
func (*Handler) DeleteAction ΒΆ
DeleteAction handles DELETE /api/permissions/actions/:id
func (*Handler) DeleteNamespace ΒΆ
DeleteNamespace handles DELETE /api/permissions/namespaces/:id
func (*Handler) DeletePolicy ΒΆ
DeletePolicy handles DELETE /api/permissions/policies/:id
func (*Handler) DeleteResource ΒΆ
DeleteResource handles DELETE /api/permissions/resources/:id
func (*Handler) EvaluateBatch ΒΆ
EvaluateBatch handles POST /api/permissions/evaluate/batch
func (*Handler) GetAnalytics ΒΆ
GetAnalytics handles GET /api/permissions/analytics
func (*Handler) GetAuditLog ΒΆ
GetAuditLog handles GET /api/permissions/audit
func (*Handler) GetMigrationStatus ΒΆ
GetMigrationStatus handles GET /api/permissions/migrate/rbac/status
func (*Handler) GetNamespace ΒΆ
GetNamespace handles GET /api/permissions/namespaces/:id
func (*Handler) GetResource ΒΆ
GetResource handles GET /api/permissions/resources/:id
func (*Handler) GetTemplate ΒΆ
GetTemplate handles GET /api/permissions/templates/:id
func (*Handler) InstantiateTemplate ΒΆ
InstantiateTemplate handles POST /api/permissions/templates/:id/instantiate
func (*Handler) ListActions ΒΆ
ListActions handles GET /api/permissions/actions
func (*Handler) ListNamespaces ΒΆ
ListNamespaces handles GET /api/permissions/namespaces
func (*Handler) ListPolicies ΒΆ
ListPolicies handles GET /api/permissions/policies
func (*Handler) ListResources ΒΆ
ListResources handles GET /api/permissions/resources
func (*Handler) ListTemplates ΒΆ
ListTemplates handles GET /api/permissions/templates
func (*Handler) MigrateFromRBAC ΒΆ
MigrateFromRBAC handles POST /api/permissions/migrate/rbac
func (*Handler) TestPolicy ΒΆ
TestPolicy handles POST /api/permissions/policies/test
func (*Handler) UpdateNamespace ΒΆ
UpdateNamespace handles PUT /api/permissions/namespaces/:id
func (*Handler) UpdatePolicy ΒΆ
UpdatePolicy handles PUT /api/permissions/policies/:id
type MessageResponse ΒΆ
type MessageResponse = handlers.MessageResponse
Response types - use from handlers package
type MigrationConfig ΒΆ
type MigrationConfig struct {
// AutoMigrate automatically converts RBAC policies
// Default: false (requires manual migration)
AutoMigrate bool `json:"autoMigrate" yaml:"autoMigrate"`
// ValidateEquivalence checks that migrated policies match RBAC
// Default: true
ValidateEquivalence bool `json:"validateEquivalence" yaml:"validateEquivalence"`
// KeepRBACPolicies retains RBAC policies after migration
// Default: true (safe to delete after validation)
KeepRBACPolicies bool `json:"keepRBACPolicies" yaml:"keepRBACPolicies"`
// DryRun simulates migration without making changes
// Default: false
DryRun bool `json:"dryRun" yaml:"dryRun"`
}
MigrationConfig controls RBAC β Permissions migration
type OrgConfig ΒΆ
type OrgConfig struct {
// Enabled controls if permissions are enabled for this org
Enabled *bool `json:"enabled,omitempty" yaml:"enabled,omitempty"`
// MaxPolicies overrides the global limit for this org
MaxPolicies *int `json:"maxPolicies,omitempty" yaml:"maxPolicies,omitempty"`
// CustomResources defines org-specific resource types
CustomResources []string `json:"customResources,omitempty" yaml:"customResources,omitempty"`
// CustomActions defines org-specific actions
CustomActions []string `json:"customActions,omitempty" yaml:"customActions,omitempty"`
// TemplateID specifies which platform template to inherit
TemplateID *string `json:"templateId,omitempty" yaml:"templateId,omitempty"`
// InheritPlatform controls platform policy inheritance
InheritPlatform *bool `json:"inheritPlatform,omitempty" yaml:"inheritPlatform,omitempty"`
}
OrgConfig allows organization-specific overrides
type PerformanceConfig ΒΆ
type PerformanceConfig struct {
// EnableMetrics enables Prometheus metrics
// Default: true
EnableMetrics bool `json:"enableMetrics" yaml:"enableMetrics"`
// EnableTracing enables OpenTelemetry tracing
// Default: false (enable in production)
EnableTracing bool `json:"enableTracing" yaml:"enableTracing"`
// TraceSamplingRate is the percentage of requests to trace
// Default: 0.01 (1%)
TraceSamplingRate float64 `json:"traceSamplingRate" yaml:"traceSamplingRate"`
// SlowQueryThreshold logs queries slower than this
// Default: 5ms
SlowQueryThreshold time.Duration `json:"slowQueryThreshold" yaml:"slowQueryThreshold"`
// EnableProfiling enables pprof endpoints
// Default: false (enable for debugging)
EnableProfiling bool `json:"enableProfiling" yaml:"enableProfiling"`
}
PerformanceConfig controls performance tuning
type Plugin ΒΆ
type Plugin struct {
// contains filtered or unexported fields
}
Plugin implements the AuthSome plugin interface for advanced permissions
func (*Plugin) Description ΒΆ
Description returns the plugin description
func (*Plugin) RegisterHooks ΒΆ
RegisterHooks registers lifecycle hooks (stub - hooks not yet defined in core)
func (*Plugin) RegisterRoutes ΒΆ
RegisterRoutes registers HTTP routes for the plugin
type Service ΒΆ
type Service struct {
// contains filtered or unexported fields
}
Service is the main permissions service Updated for V2 architecture: App β Environment β Organization
func (*Service) CreateAction ΒΆ
func (s *Service) CreateAction(ctx context.Context, appID xid.ID, orgID *xid.ID, req *handlers.CreateActionRequest) (*core.ActionDefinition, error)
CreateAction creates a new action definition Week 3 implementation
func (*Service) CreateDefaultNamespace ΒΆ
CreateDefaultNamespace creates a default namespace for a new app or organization Updated for V2 architecture
func (*Service) CreateNamespace ΒΆ
func (s *Service) CreateNamespace(ctx context.Context, appID xid.ID, orgID *xid.ID, userID xid.ID, req *handlers.CreateNamespaceRequest) (*core.Namespace, error)
CreateNamespace creates a new namespace Week 3 implementation
func (*Service) CreatePolicy ΒΆ
func (s *Service) CreatePolicy(ctx context.Context, appID xid.ID, orgID *xid.ID, userID xid.ID, req *handlers.CreatePolicyRequest) (*core.Policy, error)
CreatePolicy creates a new permission policy Week 4 implementation
func (*Service) CreateResource ΒΆ
func (s *Service) CreateResource(ctx context.Context, appID xid.ID, orgID *xid.ID, req *handlers.CreateResourceRequest) (*core.ResourceDefinition, error)
CreateResource creates a new resource definition Week 3 implementation
func (*Service) DeleteAction ΒΆ
func (s *Service) DeleteAction(ctx context.Context, appID xid.ID, orgID *xid.ID, actionID xid.ID) error
DeleteAction deletes an action definition Week 3 implementation
func (*Service) DeleteNamespace ΒΆ
func (s *Service) DeleteNamespace(ctx context.Context, appID xid.ID, orgID *xid.ID, namespaceID xid.ID) error
DeleteNamespace deletes a namespace Week 3 implementation
func (*Service) DeletePolicy ΒΆ
func (s *Service) DeletePolicy(ctx context.Context, appID xid.ID, orgID *xid.ID, policyID xid.ID) error
DeletePolicy deletes a policy Week 4 implementation
func (*Service) DeleteResource ΒΆ
func (s *Service) DeleteResource(ctx context.Context, appID xid.ID, orgID *xid.ID, resourceID xid.ID) error
DeleteResource deletes a resource definition Week 3 implementation
func (*Service) Evaluate ΒΆ
func (s *Service) Evaluate(ctx context.Context, appID xid.ID, orgID *xid.ID, userID xid.ID, req *handlers.EvaluateRequest) (*engine.Decision, error)
Evaluate evaluates a permission check Week 5 implementation - CORE FEATURE
func (*Service) EvaluateBatch ΒΆ
func (s *Service) EvaluateBatch(ctx context.Context, appID xid.ID, orgID *xid.ID, userID xid.ID, req *handlers.BatchEvaluateRequest) ([]*handlers.BatchEvaluationResult, error)
EvaluateBatch evaluates multiple permission checks efficiently Week 5 implementation
func (*Service) GetAnalytics ΒΆ
func (s *Service) GetAnalytics(ctx context.Context, appID xid.ID, orgID *xid.ID, timeRange map[string]interface{}) (*handlers.AnalyticsSummary, error)
GetAnalytics retrieves analytics data Week 8 implementation
func (*Service) GetMigrationStatus ΒΆ
func (s *Service) GetMigrationStatus(ctx context.Context, appID xid.ID, orgID *xid.ID) (*core.MigrationStatus, error)
GetMigrationStatus retrieves migration status Week 7 implementation
func (*Service) GetNamespace ΒΆ
func (s *Service) GetNamespace(ctx context.Context, appID xid.ID, orgID *xid.ID, namespaceID xid.ID) (*core.Namespace, error)
GetNamespace retrieves a namespace by ID Week 3 implementation
func (*Service) GetPolicy ΒΆ
func (s *Service) GetPolicy(ctx context.Context, appID xid.ID, orgID *xid.ID, policyID xid.ID) (*core.Policy, error)
GetPolicy retrieves a policy by ID Week 4 implementation
func (*Service) GetResource ΒΆ
func (s *Service) GetResource(ctx context.Context, appID xid.ID, orgID *xid.ID, resourceID xid.ID) (*core.ResourceDefinition, error)
GetResource retrieves a resource definition by ID Week 3 implementation
func (*Service) GetTemplate ΒΆ
GetTemplate retrieves a specific policy template Week 6 implementation
func (*Service) InstantiateTemplate ΒΆ
func (s *Service) InstantiateTemplate(ctx context.Context, appID xid.ID, orgID *xid.ID, userID xid.ID, templateID string, req *handlers.InstantiateTemplateRequest) (*core.Policy, error)
InstantiateTemplate creates a policy from a template Week 6 implementation
func (*Service) InvalidateAppCache ΒΆ
InvalidateAppCache invalidates the cache for a specific app New method for V2 architecture
func (*Service) InvalidateOrganizationCache ΒΆ
func (s *Service) InvalidateOrganizationCache(ctx context.Context, appID xid.ID, orgID xid.ID) error
InvalidateOrganizationCache invalidates the cache for a specific organization New method for V2 architecture
func (*Service) InvalidateUserCache ΒΆ
InvalidateUserCache invalidates the cache for a specific user Updated for V2 architecture
func (*Service) ListActions ΒΆ
func (s *Service) ListActions(ctx context.Context, appID xid.ID, orgID *xid.ID, namespaceID xid.ID) ([]*core.ActionDefinition, error)
ListActions lists action definitions for a namespace Week 3 implementation
func (*Service) ListAuditEvents ΒΆ
func (s *Service) ListAuditEvents(ctx context.Context, appID xid.ID, orgID *xid.ID, filters map[string]interface{}) ([]*core.AuditEvent, int, error)
ListAuditEvents lists audit log entries Week 8 implementation
func (*Service) ListNamespaces ΒΆ
func (s *Service) ListNamespaces(ctx context.Context, appID xid.ID, orgID *xid.ID) ([]*core.Namespace, error)
ListNamespaces lists namespaces for an app/org Week 3 implementation
func (*Service) ListPolicies ΒΆ
func (s *Service) ListPolicies(ctx context.Context, appID xid.ID, orgID *xid.ID, filters map[string]interface{}) ([]*core.Policy, int, error)
ListPolicies lists policies for an app/org Week 4 implementation
func (*Service) ListResources ΒΆ
func (s *Service) ListResources(ctx context.Context, appID xid.ID, orgID *xid.ID, namespaceID xid.ID) ([]*core.ResourceDefinition, error)
ListResources lists resource definitions for a namespace Week 3 implementation
func (*Service) ListTemplates ΒΆ
ListTemplates lists available policy templates Week 6 implementation
func (*Service) MigrateFromRBAC ΒΆ
func (s *Service) MigrateFromRBAC(ctx context.Context, appID xid.ID, orgID *xid.ID, req *handlers.MigrateRBACRequest) (*core.MigrationStatus, error)
MigrateFromRBAC migrates RBAC policies to permissions Week 7 implementation
func (*Service) TestPolicy ΒΆ
func (s *Service) TestPolicy(ctx context.Context, req *handlers.TestPolicyRequest) (*handlers.TestPolicyResponse, error)
TestPolicy tests a policy against test cases Week 4 implementation
func (*Service) UpdateNamespace ΒΆ
func (s *Service) UpdateNamespace(ctx context.Context, appID xid.ID, orgID *xid.ID, namespaceID xid.ID, req *handlers.UpdateNamespaceRequest) (*core.Namespace, error)
UpdateNamespace updates an existing namespace Week 3 implementation
func (*Service) UpdatePolicy ΒΆ
func (s *Service) UpdatePolicy(ctx context.Context, appID xid.ID, orgID *xid.ID, userID xid.ID, policyID xid.ID, req *handlers.UpdatePolicyRequest) (*core.Policy, error)
UpdatePolicy updates an existing policy Week 4 implementation
func (*Service) ValidatePolicy ΒΆ
func (s *Service) ValidatePolicy(ctx context.Context, req *handlers.ValidatePolicyRequest) (*handlers.ValidatePolicyResponse, error)
ValidatePolicy validates a policy expression Week 4 implementation
type StatusResponse ΒΆ
type StatusResponse = handlers.StatusResponse
Response types - use from handlers package