Documentation
¶
Index ¶
- type ComputeAdapter
- func (a *ComputeAdapter) Create(ctx context.Context, envName string, branch string) (*domain.ComputeResources, error)
- func (a *ComputeAdapter) Destroy(ctx context.Context, envName string) error
- func (a *ComputeAdapter) IsRunning(ctx context.Context, envName string) (bool, error)
- func (a *ComputeAdapter) Start(ctx context.Context, envName string, ports domain.PortMap) error
- func (a *ComputeAdapter) Stop(ctx context.Context, envName string) error
- type EnvGenAdapter
- type NetworkingAdapter
- type PostgresAdapter
- func (a *PostgresAdapter) CreateDatabase(ctx context.Context, envName string) (*domain.DatabaseInfo, error)
- func (a *PostgresAdapter) DatabaseExists(ctx context.Context, envName string) (bool, error)
- func (a *PostgresAdapter) DestroyDatabase(ctx context.Context, envName string) error
- func (a *PostgresAdapter) EnsureInfrastructure(ctx context.Context) error
- func (a *PostgresAdapter) ResetDatabase(ctx context.Context, envName string) (*domain.DatabaseInfo, error)
- func (a *PostgresAdapter) SeedTemplate(ctx context.Context, snapshotPath string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ComputeAdapter ¶
type ComputeAdapter struct {
// contains filtered or unexported fields
}
ComputeAdapter implements domain.ComputePort for local development. It manages git worktrees and per-environment docker compose infrastructure.
func NewComputeAdapter ¶
func NewComputeAdapter(config *domain.ProjectConfig, composeFile string) *ComputeAdapter
NewComputeAdapter creates a new local compute adapter.
func (*ComputeAdapter) Create ¶
func (a *ComputeAdapter) Create(ctx context.Context, envName string, branch string) (*domain.ComputeResources, error)
func (*ComputeAdapter) Destroy ¶
func (a *ComputeAdapter) Destroy(ctx context.Context, envName string) error
type EnvGenAdapter ¶
type EnvGenAdapter struct {
// contains filtered or unexported fields
}
EnvGenAdapter implements domain.EnvPort for local development. It generates .env.local files for each service and symlinks shared env files.
func NewEnvGenAdapter ¶
func NewEnvGenAdapter(config *domain.ProjectConfig) *EnvGenAdapter
NewEnvGenAdapter creates a new local env generation adapter.
func (*EnvGenAdapter) Cleanup ¶
func (a *EnvGenAdapter) Cleanup(_ context.Context, workdir string) error
func (*EnvGenAdapter) SymlinkSharedEnvFiles ¶
func (a *EnvGenAdapter) SymlinkSharedEnvFiles(_ context.Context, workdir string) error
type NetworkingAdapter ¶
type NetworkingAdapter struct {
// contains filtered or unexported fields
}
NetworkingAdapter implements domain.NetworkingPort for local development. It uses deterministic FNV-1a port allocation from the domain layer.
func NewNetworkingAdapter ¶
func NewNetworkingAdapter(config *domain.ProjectConfig) *NetworkingAdapter
NewNetworkingAdapter creates a new local networking adapter.
func (*NetworkingAdapter) AllocatePorts ¶
func (a *NetworkingAdapter) AllocatePorts(envName string) domain.PortMap
func (*NetworkingAdapter) GetServiceURL ¶
func (a *NetworkingAdapter) GetServiceURL(envName string, service string) (string, error)
type PostgresAdapter ¶
type PostgresAdapter struct {
// contains filtered or unexported fields
}
PostgresAdapter implements domain.DatabasePort for local Postgres using a shared master container with template database cloning.
func NewPostgresAdapter ¶
func NewPostgresAdapter(name string, config domain.DatabaseConfig) *PostgresAdapter
NewPostgresAdapter creates a new local Postgres adapter.
func NewPostgresAdapterWithHost ¶
func NewPostgresAdapterWithHost(name string, config domain.DatabaseConfig, host string) *PostgresAdapter
NewPostgresAdapterWithHost creates a Postgres adapter with a custom host.
func (*PostgresAdapter) CreateDatabase ¶
func (a *PostgresAdapter) CreateDatabase(ctx context.Context, envName string) (*domain.DatabaseInfo, error)
func (*PostgresAdapter) DatabaseExists ¶
func (*PostgresAdapter) DestroyDatabase ¶
func (a *PostgresAdapter) DestroyDatabase(ctx context.Context, envName string) error
func (*PostgresAdapter) EnsureInfrastructure ¶
func (a *PostgresAdapter) EnsureInfrastructure(ctx context.Context) error
func (*PostgresAdapter) ResetDatabase ¶
func (a *PostgresAdapter) ResetDatabase(ctx context.Context, envName string) (*domain.DatabaseInfo, error)
func (*PostgresAdapter) SeedTemplate ¶
func (a *PostgresAdapter) SeedTemplate(ctx context.Context, snapshotPath string) error