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

ecr

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2026 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

Package ecr mints an Amazon ECR registry password from an AWS access key.

ECR has no long-lived registry password: GetAuthorizationToken trades an access key for one that lasts twelve hours. Two places need that — an image app pulling with its own credential (core/oci, issue #41) and the install's image registry adapter pushing builds (adapter/imageregistry/ecr) — so it lives here, in a leaf package core and the adapters can both import, as internal/registrylimit does.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Mint

func Mint(ctx context.Context, k Key, whose string) (string, secret.Value, error)

Mint asks ECR for a registry password. whose names the key's owner in the refusal — "the app's", "the image registry's" — so the message says which credential to replace.

func Region

func Region(registry string) (string, bool)

Region reads the region from an ECR registry host: 123456789012.dkr.ecr.us-east-1.amazonaws.com is us-east-1.

Types

type Key

type Key struct {
	AccessKeyID     string
	SecretAccessKey secret.Value
	Region          string

	// Endpoint overrides the ECR API endpoint, for tests.
	Endpoint string
}

Key is an AWS access key, and where to ask.

Jump to

Keyboard shortcuts

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