aws

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2022 License: Apache-2.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseRegistry added in v0.11.0

func ParseRegistry(registry string) (accountId, awsEcrRegion string, ok bool)

ParseRegistry returns the AWS account ID and region and `true` if the image registry/repository is hosted in AWS's Elastic Container Registry, otherwise empty strings and `false`.

Types

type Client

type Client struct {
	*aws.Config
}

Client is a AWS ECR client which can log into the registry and return authorization information.

func NewClient

func NewClient() *Client

NewClient creates a new ECR client with default configurations.

func (*Client) Login

func (c *Client) Login(ctx context.Context, autoLogin bool, image string) (authn.Authenticator, error)

Login attempts to get the authentication material for ECR. It extracts the account and region information from the image URI. The caller can ensure that the passed image is a valid ECR image using ParseRegistry().

Jump to

Keyboard shortcuts

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