Help us shape the future of Go! Take the 2026 Go Developer Survey

integrations

package
v1.233.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KindAWSECR       = "aws/ecr"
	KindAWSECRPublic = "aws/ecr-public"
	KindAWSEKS       = "aws/eks"
	KindAzureACR     = "azure/acr"
	KindAzureAKS     = "azure/aks"
	KindGCPGKE       = "gcp/gke"
	KindGitHubSTS    = "github/sts"
)

Integration kind constants.

Variables

This section is empty.

Functions

func IsRegistered

func IsRegistered(kind string) bool

IsRegistered checks if an integration kind is registered.

func ListKinds

func ListKinds() []string

ListKinds returns all registered integration kinds in sorted order.

func Register

func Register(kind string, factory IntegrationFactory)

Register adds an integration factory for a kind. This should be called from init() functions in integration packages. Panics if kind is empty or factory is nil to catch configuration errors early.

Types

type Integration

type Integration interface {
	// Kind returns the integration type (e.g., "aws/ecr", "aws/eks").
	Kind() string

	// Execute performs the integration using the provided credentials.
	// Returns nil on success, error on failure.
	Execute(ctx context.Context, creds types.ICredentials) error

	// Cleanup reverses the effects of Execute (e.g., removes kubeconfig entries, docker logout).
	// Called during identity/provider logout to clean up integration artifacts.
	// Idempotent — returns nil if nothing to clean up.
	// Errors are non-fatal during logout (logged as warnings, do not block logout).
	Cleanup(ctx context.Context) error

	// Environment returns environment variables contributed by this integration.
	// Returns vars based on configuration (deterministic), not Execute() output.
	// Called by the manager when composing env vars for atmos auth env / auth shell.
	Environment() (map[string]string, error)
}

Integration represents a client-only credential materialization. Integrations derive credentials from identities for service-specific access (e.g., ECR docker login, EKS kubeconfig).

func Create

func Create(config *IntegrationConfig) (Integration, error)

Create instantiates an integration from config.

type IntegrationConfig

type IntegrationConfig struct {
	Name   string
	Config *schema.Integration
	// Realm is the credential isolation realm. Integrations that persist secret
	// material to disk (e.g., github/sts) use it to scope their state paths so
	// minted credentials are isolated per repository/customer environment.
	// Integrations that don't need it (aws/ecr, aws/eks) may ignore it.
	Realm string
}

IntegrationConfig wraps the schema.Integration with the integration name.

type IntegrationFactory

type IntegrationFactory func(config *IntegrationConfig) (Integration, error)

IntegrationFactory creates integrations from configuration.

Directories

Path Synopsis
Package github implements the github/sts auth integration: a just-in-time, least-privilege GitHub token broker for CI.
Package github implements the github/sts auth integration: a just-in-time, least-privilege GitHub token broker for CI.

Jump to

Keyboard shortcuts

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