ecr

package
v0.19.783 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2026 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(v *validator.Validate, opts ...Option) (*ecrAuthorizer, error)

func TrimRepositoryName

func TrimRepositoryName(repoName, serverAddress string) (string, error)

TrimRepositoryName trims off the serverAddress from a repo name, so when something like a full URI (with accountID) is passed in, we can use the same code paths for it.

Types

type Authorization

type Authorization struct {
	RegistryToken string `validate:"required"`
	Username      string `validate:"required"`
	ServerAddress string `validate:"required"`
}

func ParseAuthorizationData

func ParseAuthorizationData(data *ecr_types.AuthorizationData) (*Authorization, error)

parseAuthorizationData: parses authorization data into the required return format

func ParsePublicAuthorizationData

func ParsePublicAuthorizationData(data *ecrpublictypes.AuthorizationData) (*Authorization, error)

type Client

type Client interface {
	GetAuthorization(context.Context) (*Authorization, error)
}

type Option

type Option func(*ecrAuthorizer) error

func WithCredentials

func WithCredentials(creds *credentials.Config) Option

WithCredentials is used to set the credentials that will be used by this

func WithImageURL

func WithImageURL(url string) Option

WithImageURL is used to determine the regsitry id

func WithRegistryID

func WithRegistryID(registryID string) Option

WithRegistryID is used to set the registry id

func WithRepository

func WithRepository(repository string) Option

WithRepository is used to set the registry id by parsing the repository url

func WithUseDefault

func WithUseDefault(useDefault bool) Option

WithUseDefault is used to fetch the default registry

Jump to

Keyboard shortcuts

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