aws

package
v0.37.1 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 13 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 {
	// contains filtered or unexported fields
}

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 empty ECR client. NOTE: In order to avoid breaking the auth API with aws-sdk-go-v2's default config, return an empty Client. Client.getLoginAuth() loads the default config if Client.config is nil. This also enables tests to configure the Client with stub before calling the login method using Client.WithConfig().

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.

func (*Client) OIDCLogin added in v0.27.0

func (c *Client) OIDCLogin(ctx context.Context, registryURL string) (authn.Authenticator, error)

OIDCLogin attempts to get the authentication material for ECR.

func (*Client) WithConfig added in v0.17.0

func (c *Client) WithConfig(cfg *aws.Config)

WithConfig allows setting the client config if it's uninitialized.

Jump to

Keyboard shortcuts

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