Documentation
¶
Overview ¶
Package ecr provides emulation of Amazon Elastic Container Registry (ECR).
Implemented operations: CreateRepository, DescribeRepositories, DeleteRepository, GetAuthorizationToken, DescribeRegistry, ListImages, PutImage, BatchGetImage, BatchDeleteImage, SetRepositoryPolicy, GetRepositoryPolicy, DeleteRepositoryPolicy, PutLifecyclePolicy, GetLifecyclePolicy, DeleteLifecyclePolicy, TagResource, UntagResource, ListTagsForResource.
The control-plane operations (repository CRUD, image metadata, tags, policies) are fully implemented in-memory. When Docker is available, ECR also lazy-starts one shared local registry:2 container per process and returns matching auth credentials via GetAuthorizationToken.
Index ¶
- type Image
- type ImageIdentifier
- type Repository
- type Service
- func (s *Service) Dispatch(w http.ResponseWriter, r *http.Request)
- func (s *Service) InitBus(bus *events.Bus)
- func (s *Service) Name() string
- func (s *Service) Operations() []op.Operation
- func (s *Service) RegisterRoutes(_ chi.Router)
- func (s *Service) Stop(ctx context.Context)
- func (s *Service) SupportedProtocols() []codec.Codec
- func (s *Service) TargetPrefix() string
- type Tag
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Image ¶
type Image struct {
RegistryId string `json:"registryId"`
RepositoryName string `json:"repositoryName"`
ImageId ImageIdentifier `json:"imageId"`
ImageManifest string `json:"imageManifest"`
ImageManifestMediaType string `json:"imageManifestMediaType,omitempty"`
}
Image represents an ECR image record.
type ImageIdentifier ¶
type ImageIdentifier struct {
ImageDigest string `json:"imageDigest,omitempty"`
ImageTag string `json:"imageTag,omitempty"`
}
ImageIdentifier uniquely identifies an image by tag or digest.
type Repository ¶
type Repository struct {
RepositoryArn string `json:"repositoryArn"`
RegistryId string `json:"registryId"`
RepositoryName string `json:"repositoryName"`
RepositoryUri string `json:"repositoryUri"`
CreatedAt float64 `json:"createdAt"`
ImageTagMutability string `json:"imageTagMutability"`
}
Repository represents an ECR repository.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service implements the ECR emulator.
func (*Service) Operations ¶
Operations implements router.ProtocolService.
func (*Service) RegisterRoutes ¶
func (*Service) SupportedProtocols ¶
SupportedProtocols implements router.ProtocolService.