target

package
v1.223.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 15, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func AWSProfile

func AWSProfile(ep *emu.Endpoint) emu.Profile

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

func AzureProfile(ep *emu.Endpoint) emu.Profile

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

func GCPProfile(ep *emu.Endpoint) emu.Profile

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

func GitProfile(ep *emu.Endpoint) emu.Profile

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

func KubernetesProfile(_ *emu.Endpoint) emu.Profile

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 OnePasswordProfile added in v1.223.0

func OnePasswordProfile(ep *emu.Endpoint) emu.Profile

OnePasswordProfile builds the connection profile for a 1Password Connect mock.

func RegistryProfile

func RegistryProfile(ep *emu.Endpoint) emu.Profile

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

func TerraformProviderName(target string) (string, bool)

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

func VaultProfile(ep *emu.Endpoint) emu.Profile

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL