ec2authenticator

package
v0.0.0-...-90deddd Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package ec2authenticator implements Docker repository authentication for ECR using an AWS SDK session and a root.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type T

type T struct {
	// Session is an AWS SDK session that is authorized
	// to generate authorization tokens for the account's
	// ECR repository.
	Session *session.Session
}

T is a Docker repository authenticator for ECR repositories.

func New

func New(sess *session.Session) *T

New returns a new ec2authenticator based on the provided session.

func (*T) Authenticate

func (a *T) Authenticate(ctx context.Context, cfg *types.AuthConfig) error

Authenticate deposits Docker repository authentication material for the ECR repository into the provided cfg object.

func (*T) Authenticates

func (a *T) Authenticates(ctx context.Context, image string) (bool, error)

Authenticates tells whether the authenticator can authenticate the provided image.

Jump to

Keyboard shortcuts

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