Documentation ¶
Overview ¶
Abstracts the details of talking to the ECR API to facilitate testing
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( TEST_REGISTRY = "123456789012.dkr.ecr.eu-west-1.amazonaws.com" TEST_USER = "jdoe" TEST_PASSWORD = "pasword123" TEST_EXPIRY = "2023-01-01T12:00:00Z" TEST_AUTH_DATA = b64.StdEncoding.EncodeToString([]byte(fmt.Sprintf("%s:%s", TEST_USER, TEST_PASSWORD))) VALID_LIFETIME = "12h0m0s" TEST_NOW = clock.MustParseTime(TEST_EXPIRY).Add(-clock.MustParseDuration(VALID_LIFETIME)) )
Functions ¶
This section is empty.
Types ¶
type ConcreteECRAuthentication ¶
func (*ConcreteECRAuthentication) GetAuthorizationToken ¶
func (a *ConcreteECRAuthentication) GetAuthorizationToken() (*ecr.AuthorizationData, error)
func (*ConcreteECRAuthentication) SetCredentials ¶
func (a *ConcreteECRAuthentication) SetCredentials(creds *Credentials, region string) error
type Credentials ¶
type ECRAuthentication ¶
type ECRAuthentication interface { GetAuthorizationToken() (*ecr.AuthorizationData, error) SetCredentials(creds *Credentials, region string) error }
func NewECRAuthentication ¶
func NewECRAuthentication() ECRAuthentication
func NewMockAuthentication ¶
func NewMockAuthentication() ECRAuthentication
type MockECRAuthentication ¶
type MockECRAuthentication struct{}
func (*MockECRAuthentication) GetAuthorizationToken ¶
func (m *MockECRAuthentication) GetAuthorizationToken() (*ecr.AuthorizationData, error)
func (*MockECRAuthentication) SetCredentials ¶
func (m *MockECRAuthentication) SetCredentials(creds *Credentials, region string) error
Click to show internal directories.
Click to hide internal directories.