Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Project ¶
type Project struct {
Runtime *runtime.Runtime
Provisioner *provisioner.Provisioner
Composer *composer.Composer
Workstation *workstation.Workstation
}
Project orchestrates the setup and initialization of a Windsor project. It coordinates context, provisioner, composer, and workstation managers to provide a unified interface for project initialization and management.
func NewProject ¶
NewProject creates and initializes a new Project instance with all required managers. It sets up the execution context, applies config defaults, and creates provisioner, composer, and workstation managers. The workstation is only created if the project is in dev mode. Returns the initialized Project or an error if any step fails. After creation, call Configure() to apply flag overrides if needed. Optional overrides can be provided via opts to inject mocks for testing. If opts contains a Project with Runtime set, that runtime will be reused.
func (*Project) Configure ¶
Configure loads configuration from disk and applies flag-based overrides. This should be called after NewProject if command flags need to override configuration values. Returns an error if loading or applying overrides fails.
func (*Project) Initialize ¶
Initialize runs the complete initialization sequence for the project. It prepares the workstation (creates services and assigns IPs), prepares context, generates infrastructure, prepares tools, and bootstraps the environment. The overwrite parameter controls whether infrastructure generation should overwrite existing files. The optional blueprintURL parameter specifies the blueprint artifact to load (OCI URL or local .tar.gz path). Returns an error if any step fails.
func (*Project) PerformCleanup ¶
PerformCleanup removes context-specific artifacts including volumes, terraform modules, and generated configuration files. It calls the config handler's Clean method to remove saved state, then deletes the .volumes directory, .windsor/contexts/<context> directory, .windsor/Corefile, and .windsor/docker-compose.yaml. Returns an error if any cleanup step fails.