This commit captures the current state before implementing the composable monorepo template system. Key changes included: Infrastructure: - Add CockroachDB provisioner adapter for database provisioning - Add Redis provisioner adapter for cache provisioning - Add build events system with PostgreSQL storage - Add WebSocket endpoint for real-time build progress Code agent improvements: - Fix Claude Code adapter to use default allowed tools instead of dangerously-skip-permissions - Add context-aware stream closing for cancellation support - Improve parser tests for edge cases Build system: - Add build event constants and metrics - Remove deprecated git_operations.go (replaced by pod_git_operations.go) - Add rollback logic for multi-step provisioning operations Documentation: - Add composable-monorepo feature documentation - Add DNS/Cloudflare service documentation - Update deployment and troubleshooting guides Cookbooks: - Add fullstack-app cookbook - Refactor landing-test with shared library Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
29 lines
1.1 KiB
Go
29 lines
1.1 KiB
Go
package port
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/orchard9/rdev/internal/domain"
|
|
)
|
|
|
|
// DatabaseProvisioner provisions isolated databases for projects.
|
|
// Implementation uses CockroachDB to create per-project databases and users.
|
|
type DatabaseProvisioner interface {
|
|
// CreateProjectDatabase provisions an isolated database for a project.
|
|
// Creates a database and user scoped to the project.
|
|
// Returns credentials that should be injected into the project's environment.
|
|
CreateProjectDatabase(ctx context.Context, projectID string) (*domain.DatabaseCredentials, error)
|
|
|
|
// DeleteProjectDatabase removes database access for a project.
|
|
// Drops the database and user.
|
|
DeleteProjectDatabase(ctx context.Context, projectID string) error
|
|
|
|
// GetProjectDatabase retrieves database credentials for a project.
|
|
// Returns nil if the project has no database provisioned.
|
|
// Note: Password cannot be retrieved, only verified against stored credentials.
|
|
GetProjectDatabase(ctx context.Context, projectID string) (*domain.DatabaseCredentials, error)
|
|
|
|
// TestConnection verifies the database provisioner can connect to CockroachDB.
|
|
TestConnection(ctx context.Context) error
|
|
}
|