type AuthEntry struct { AuthorizationToken string RequestedAt time.Time ExpiresAt time.Time ProxyEndpoint string Service Service }
func (authEntry *AuthEntry) IsValid(testTime time.Time) bool
IsValid checks if AuthEntry is still valid at testTime. AuthEntries expire at 1/2 of their original requested window.
type CredentialsCache interface { Get(registry string) *AuthEntry GetPublic() *AuthEntry Set(registry string, entry *AuthEntry) List() []*AuthEntry Clear() }
func BuildCredentialsCache(config aws.Config, cacheDir string) CredentialsCache
func NewFileCredentialsCache(path string, filename string, cachePrefixKey string, publicCacheKey string) CredentialsCache
NewFileCredentialsCache returns a new file credentials cache.
path is used for temporary files during save, and filename should be a relative filename in the same directory where the cache is serialized and deserialized.
cachePrefixKey is used for scoping credentials for a given credential cache (i.e. region and accessKey).
func NewNullCredentialsCache() CredentialsCache
type RegistryCache struct { Registries map[string]*AuthEntry Version string }
type Service string
const ( ServiceECR Service = "ecr" ServiceECRPublic Service = "ecr-public" )