Changeset 0.22.2 (#96)
This commit is contained in:
@@ -45,6 +45,7 @@ type Stores struct {
|
||||
Workspaces WorkspaceStore
|
||||
GitCredentials GitCredentialStore
|
||||
CapOverrides CapabilityOverrideStore
|
||||
RoutingPolicies RoutingPolicyStore
|
||||
}
|
||||
|
||||
// =========================================
|
||||
@@ -587,6 +588,33 @@ type CapabilityOverrideStore interface {
|
||||
DeleteForProvider(ctx context.Context, providerConfigID string) error
|
||||
}
|
||||
|
||||
// =========================================
|
||||
// ROUTING POLICY STORE (v0.22.2)
|
||||
// =========================================
|
||||
|
||||
type RoutingPolicyStore interface {
|
||||
// Create adds a new routing policy.
|
||||
Create(ctx context.Context, p *models.RoutingPolicy) error
|
||||
|
||||
// Update modifies an existing routing policy.
|
||||
Update(ctx context.Context, p *models.RoutingPolicy) error
|
||||
|
||||
// Delete removes a routing policy by ID.
|
||||
Delete(ctx context.Context, id string) error
|
||||
|
||||
// GetByID returns a single policy.
|
||||
GetByID(ctx context.Context, id string) (*models.RoutingPolicy, error)
|
||||
|
||||
// ListActive returns all active policies, ordered by priority ASC.
|
||||
ListActive(ctx context.Context) ([]models.RoutingPolicy, error)
|
||||
|
||||
// ListAll returns all policies (including inactive), for admin listing.
|
||||
ListAll(ctx context.Context) ([]models.RoutingPolicy, error)
|
||||
|
||||
// ListForTeam returns active policies applicable to a team (team-scoped + global).
|
||||
ListForTeam(ctx context.Context, teamID string) ([]models.RoutingPolicy, error)
|
||||
}
|
||||
|
||||
// =========================================
|
||||
// SHARED TYPES
|
||||
// =========================================
|
||||
|
||||
Reference in New Issue
Block a user