| 1 | package Eixo::Docker::Version; | ||
| 2 | |||
| 3 | use strict; | ||
| 4 | use warnings; | ||
| 5 | |||
| 6 | use Eixo::Base::Clase qw(Eixo::Rest::Product); | ||
| 7 | |||
| 8 | has( | ||
| 9 | |||
| 10 | Version => "", | ||
| 11 | Os => undef, | ||
| 12 | KernelVersion => undef, | ||
| 13 | GoVersion => undef, | ||
| 14 | GitCommit => undef, | ||
| 15 | Arch => undef, | ||
| 16 | ApiVersion => undef, | ||
| 17 | Experimental => undef, | ||
| 18 | ); | ||
| 19 | |||
| 20 | |||
| 21 | sub get{ | ||
| 22 | my ($self, %args) = @_; | ||
| 23 | |||
| 24 | $args{__implicit_format} = 1; | ||
| 25 | |||
| 26 | $self->api->getVersion( | ||
| 27 | |||
| 28 | args=>\%args, | ||
| 29 | |||
| 30 | __callback=> sub { | ||
| 31 | |||
| 32 | $self->populate($_[0]); | ||
| 33 | } | ||
| 34 | |||
| 35 | ); | ||
| 36 | |||
| 37 | $self; | ||
| 38 | } | ||
| 39 | |||
| 40 | |||
| 41 | |||
| 42 | 1; |