Docker-Registry
view release on metacpan or search on metacpan
lib/Docker/Registry/Auth/GCEServiceAccount.pm view on Meta::CPAN
use Crypt::JWT qw/encode_jwt/;
use JSON::MaybeXS;
use Path::Class;
use URI;
use HTTP::Tiny;
has service_account_file => (is => 'ro', isa => Str, default => sub {
"$ENV{HOME}/.gcloud/sd.json"
});
has service_account => (is => 'ro', isa => HashRef, lazy => 1, default => sub {
my $self = shift;
my $f = Path::Class::File->new($self->service_account_file);
my $json = JSON::MaybeXS->new;
return $json->decode(join '', $f->slurp);
});
has client_email => (is => 'ro', isa => Str, lazy => 1, default => sub {
my $self = shift;
my $value = $self->service_account->{ client_email };
Docker::Registry::Auth::Exception->throw({
lib/Docker/Registry/Auth/GCEServiceAccount.pm view on Meta::CPAN
});
has private_key => (is => 'ro', isa => Str, lazy => 1, default => sub {
my $self = shift;
my $value = $self->service_account->{ private_key };
Docker::Registry::Auth::Exception->throw({
message => "private_key entry not found in service_account information",
}) if (not defined $value);
return $value;
});
has scopes => (is => 'ro', isa => ArrayRef[Str], default => sub {
[ 'https://www.googleapis.com/auth/devstorage.read_only' ];
});
has time_source => (is => 'ro', isa => CodeRef, default => sub {
return sub { time };
});
has expiry => (is => 'ro', isa => Int, default => 300);
has signed_jwt => (is => 'ro', isa => Str, lazy => 1, default => sub {
lib/Docker/Registry/V2.pm view on Meta::CPAN
package Docker::Registry::Call::Repositories;
use Moo;
use Types::Standard qw/Int Str/;
has n => (is => 'ro', isa => Int);
has last => (is => 'ro', isa => Str);
package Docker::Registry::Result::Repositories;
use Moo;
use Types::Standard qw/ArrayRef Str/;
has repositories => (is => 'ro', isa => ArrayRef[Str]);
has last => (is => 'ro', isa => Str);
package Docker::Registry::Call::RepositoryTags;
use Moo;
use Types::Standard qw/Int Str/;
has repository => (is => 'ro', isa => Str, required => 1);
has n => (is => 'ro', isa => Int);
has last => (is => 'ro', isa => Str);
package Docker::Registry::Result::RepositoryTags;
use Moo;
use Types::Standard qw/ArrayRef Str/;
has name => (is => 'ro', isa => Str, required => 1);
has tags => (is => 'ro', isa => ArrayRef[Str], required => 1);
has last => (is => 'ro', isa => Str);
package Docker::Registry::V2;
use Moo;
use Docker::Registry::Types qw(DockerRegistryURI);
use Types::Standard qw/Str ConsumerOf InstanceOf/;
has url => (is => 'ro', coerce => 1, isa => DockerRegistryURI, required => 1);
has api_base => (is => 'ro', default => 'v2');
( run in 0.338 second using v1.01-cache-2.11-cpan-5f2e87ce722 )