Documentation
¶
Overview ¶
Package target holds the per-target connection-profile builders for emulator drivers: each turns a live emulator Endpoint into a Profile (SDK env vars, a Terraform provider fragment, or a kubeconfig placeholder). The concrete drivers in pkg/emulator/driver wire these builders to driver names.
Index ¶
- func AWSProfile(ep *emu.Endpoint) emu.Profile
- func AzureProfile(ep *emu.Endpoint) emu.Profile
- func GCPProfile(ep *emu.Endpoint) emu.Profile
- func GitProfile(ep *emu.Endpoint) emu.Profile
- func KubernetesProfile(_ *emu.Endpoint) emu.Profile
- func RegistryProfile(ep *emu.Endpoint) emu.Profile
- func TerraformProviderName(target string) (string, bool)
- func VaultProfile(ep *emu.Endpoint) emu.Profile
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AWSProfile ¶
AWSProfile builds the connection profile for an AWS-target emulator: the SDK env vars (endpoint + dummy creds + region), the internal-SDK resolver URL, and a Terraform provider fragment carrying the behavior flags env cannot set.
func AzureProfile ¶
AzureProfile builds the connection profile for an Azure-target emulator (Azurite-compatible storage): an Azure Storage connection string + account credentials pointed at the live blob endpoint.
func GCPProfile ¶
GCPProfile builds the connection profile for a GCP-target emulator. GCP is per-service: each SDK reads its own *_EMULATOR_HOST (a bare host:port, except GCS which wants a URL). A single-port emulator points them all at one address.
func GitProfile ¶
GitProfile builds the connection profile for a Git server emulator (Gitea): it surfaces the live HTTP base URL so config and templates can reference the running endpoint (e.g. composing a clone/push URL when the host port is auto-assigned). The repository credentials are throwaway-local and embedded in the configured remote URL, so the profile carries no secret.
func KubernetesProfile ¶
KubernetesProfile is the placeholder profile for kubernetes-target drivers. The kubeconfig is not built from the endpoint alone — it is harvested from the running container by the kubernetes/emulator identity (which has runtime access). The driver only supplies image/port defaults.
func RegistryProfile ¶
RegistryProfile builds the connection profile for an OCI / Terraform registry emulator: the live host:port, surfaced for vendoring / the registry cache (consumed via the !emulator function in V1).
func TerraformProviderName ¶
TerraformProviderName maps an emulator target to the Terraform provider it contributes a provider-config fragment for (aws → "aws", gcp → "google", azure → "azurerm"), returning ok=false for targets with no Terraform provider (kubernetes, vault, registry). This per-cloud mapping lives in the target package — which owns every other per-cloud profile detail — rather than leaking into the generic provider-config contributor.
func VaultProfile ¶
VaultProfile builds the connection profile for a Vault/OpenBao emulator (API-compatible): VAULT_ADDR / BAO_ADDR pointing at the published endpoint. The root token is dynamic (the file-backed server generates it at init), so the manager harvests it from the running container and adds VAULT_TOKEN/BAO_TOKEN in Resolve — this builder only sets the address.
Types ¶
This section is empty.