ecr

package
v1.53.2 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoAWSECRAuthorizationData = errors.New("no ecr authorization data provided")

Functions

func Credential added in v1.41.2

func Credential(store *CredentialsStore) auth.CredentialFunc

Credential returns a Credential() function that can be used by auth.Client.

Types

type Client

type Client interface {
	// GetAuthorizationToken retrieves an authorization token for accessing an ECR registry (private or public)
	GetAuthorizationToken(ctx context.Context) (string, time.Time, error)
}

Client interface defines a generic method for getting an authorization token. This interface will be implemented by PrivateClient and PublicClient

func NewPrivateClient added in v1.41.2

func NewPrivateClient(endpoint string) Client

func NewPublicClient added in v1.41.2

func NewPublicClient(endpoint string) Client

type CredentialsStore added in v1.41.2

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

func NewCredentialsStore added in v1.41.2

func NewCredentialsStore(endpoint string) *CredentialsStore

func (*CredentialsStore) Get added in v1.41.2

func (s *CredentialsStore) Get(ctx context.Context, serverAddress string) (auth.Credential, error)

Get retrieves credentials from the store for the given server address.

type PrivateClient added in v1.41.2

type PrivateClient interface {
	// GetAuthorizationToken retrieves an authorization token for accessing a private ECR registry
	GetAuthorizationToken(ctx context.Context, params *ecr.GetAuthorizationTokenInput, optFns ...func(*ecr.Options)) (*ecr.GetAuthorizationTokenOutput, error)
}

PrivateClient interface defines methods for interacting with a private Amazon ECR registry

type PublicClient added in v1.41.2

type PublicClient interface {
	// GetAuthorizationToken retrieves an authorization token for accessing a public ECR registry
	GetAuthorizationToken(ctx context.Context, params *ecrpublic.GetAuthorizationTokenInput, optFns ...func(*ecrpublic.Options)) (*ecrpublic.GetAuthorizationTokenOutput, error)
}

PublicClient interface defines methods for interacting with a public Amazon ECR registry

Jump to

Keyboard shortcuts

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