Documentation

Overview

Package ecr provides a client to make API requests to Amazon EC2 Container Registry.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func URIFromARN

func URIFromARN(repositoryARN string) (string, error)

URIFromARN converts an ECR Repo ARN to a Repository URI

Types

type Auth

type Auth struct {
	Username string
	Password string
}

Auth represent basic authentication credentials.

type ECR

type ECR struct {
	// contains filtered or unexported fields
}

ECR wraps an AWS ECR client.

func New

func New(s *session.Session) ECR

New returns a ECR configured against the input session.

func (ECR) ClearRepository

func (c ECR) ClearRepository(repoName string) error

ClearRepository orchestrates a ListImages call followed by a DeleteImages call to delete all images from the input ECR repository name.

func (ECR) DeleteImages

func (c ECR) DeleteImages(images []Image, repoName string) error

DeleteImages calls the ECR BatchDeleteImage API with the input image list and repository name.

func (ECR) GetECRAuth

func (c ECR) GetECRAuth() (Auth, error)

GetECRAuth returns the basic authentication credentials needed to push images.

func (ECR) GetRepository

func (c ECR) GetRepository(name string) (string, error)

GetRepository returns the ECR repository URI.

func (ECR) ListImages

func (c ECR) ListImages(repoName string) ([]Image, error)

ListImages calls the ECR DescribeImages API and returns a list of Image metadata for images in the input ECR repository name.

type Image

type Image struct {
	Digest string
}

Image houses metadata for ECR repository images.

Source Files

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.