Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAuthorizationToken ¶
func GetAuthorizationToken(ctx context.Context, region string, credentials aws.Credentials, roleArn string, client ClientInterface) (ecrTypes.AuthorizationData, error)
func Initialize ¶
Types ¶
type ClientInterface ¶ added in v0.3.13
type ClientInterface interface {
GetAuthorizationToken(ctx context.Context, input *ecr.GetAuthorizationTokenInput, _ ...func(*ecr.Options)) (*ecr.GetAuthorizationTokenOutput, error)
}
type StringableCredentials ¶
type StringableCredentials struct { aws.Credentials // Region specifies which region to connect to when using this credential Region string // Assume a role RoleArn string }
func (*StringableCredentials) GetCreds ¶ added in v0.3.6
func (c *StringableCredentials) GetCreds(_ context.Context) (aws.Credentials, error)
func (*StringableCredentials) Retrieve ¶ added in v0.3.6
func (c *StringableCredentials) Retrieve(_ context.Context) (aws.Credentials, error)
func (StringableCredentials) String ¶
func (c StringableCredentials) String() string
func (*StringableCredentials) ToAwsConfig ¶ added in v0.3.6
func (c *StringableCredentials) ToAwsConfig() aws.Config
type Token ¶
type Token struct { Creds StringableCredentials CurrentToken *ecrTypes.AuthorizationData TokenValidityDuration time.Duration LastQueriedAt time.Time Client ClientInterface }
func NewECRToken ¶
func NewECRToken(ctx context.Context, creds StringableCredentials, client ClientInterface) (*Token, error)
type TokenManager ¶
func NewECRTokenManager ¶
func NewECRTokenManager(logger logur.Logger) *TokenManager
func (*TokenManager) GetAuthorizationToken ¶
func (t *TokenManager) GetAuthorizationToken(ctx context.Context, key StringableCredentials, client ClientInterface) (ecrTypes.AuthorizationData, error)
Click to show internal directories.
Click to hide internal directories.