line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Docker::Registry::ECR; |
2
|
1
|
|
|
1
|
|
13687
|
use Moo; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
3
|
1
|
|
|
1
|
|
323
|
use Types::Standard qw/Str/; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
4
|
|
|
|
|
|
|
extends 'Docker::Registry::V2'; |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
has '+url' => (lazy => 1, default => sub { |
7
|
|
|
|
|
|
|
my $self = shift; |
8
|
|
|
|
|
|
|
die "Must specify account_id and region in constructor" if (not defined $self->account_id or |
9
|
|
|
|
|
|
|
not defined $self->region); |
10
|
|
|
|
|
|
|
sprintf 'https://%s.dkr.ecr.%s.amazonaws.com', $self->account_id, $self->region; |
11
|
|
|
|
|
|
|
}); |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
around build_auth => sub { |
14
|
|
|
|
|
|
|
my ($orig, $self) = @_; |
15
|
|
|
|
|
|
|
require Docker::Registry::Auth::ECR; |
16
|
|
|
|
|
|
|
Docker::Registry::Auth::ECR->new(region => $self->region); |
17
|
|
|
|
|
|
|
}; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
has account_id => (is => 'ro', isa => Str); |
20
|
|
|
|
|
|
|
has region => (is => 'ro', isa => Str); |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
1; |