line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package VM::HetznerCloud::API::SshKeys; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# ABSTRACT: SshKeys |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
# --- |
6
|
|
|
|
|
|
|
# This class is auto-generated by bin/get_hetzner_info.pl |
7
|
|
|
|
|
|
|
# --- |
8
|
|
|
|
|
|
|
|
9
|
3
|
|
|
3
|
|
1717
|
use v5.24; |
|
3
|
|
|
|
|
12
|
|
10
|
|
|
|
|
|
|
|
11
|
3
|
|
|
3
|
|
17
|
use Moo; |
|
3
|
|
|
|
|
26
|
|
|
3
|
|
|
|
|
21
|
|
12
|
3
|
|
|
3
|
|
960
|
use Types::Standard qw(:all); |
|
3
|
|
|
|
|
8
|
|
|
3
|
|
|
|
|
30
|
|
13
|
|
|
|
|
|
|
|
14
|
3
|
|
|
3
|
|
71500
|
use Mojo::Base -strict, -signatures; |
|
3
|
|
|
|
|
20
|
|
|
3
|
|
|
|
|
33
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
extends 'VM::HetznerCloud::APIBase'; |
17
|
|
|
|
|
|
|
|
18
|
3
|
|
|
3
|
|
712
|
use utf8; |
|
3
|
|
|
|
|
8
|
|
|
3
|
|
|
|
|
24
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
our $VERSION = '0.0.3'; # VERSION |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
has endpoint => ( is => 'ro', isa => Str, default => sub { 'ssh_keys' } ); |
23
|
|
|
|
|
|
|
|
24
|
0
|
|
|
0
|
1
|
|
sub list ($self, %params) { |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
25
|
0
|
|
|
|
|
|
my $request_params = { |
26
|
|
|
|
|
|
|
'fingerprint' => { |
27
|
|
|
|
|
|
|
'in' => 'query', |
28
|
|
|
|
|
|
|
'required' => 0, |
29
|
|
|
|
|
|
|
'validate' => 'string', |
30
|
|
|
|
|
|
|
}, |
31
|
|
|
|
|
|
|
'label_selector' => { |
32
|
|
|
|
|
|
|
'in' => 'query', |
33
|
|
|
|
|
|
|
'required' => 0, |
34
|
|
|
|
|
|
|
'validate' => 'string', |
35
|
|
|
|
|
|
|
}, |
36
|
|
|
|
|
|
|
'name' => { |
37
|
|
|
|
|
|
|
'in' => 'query', |
38
|
|
|
|
|
|
|
'required' => 0, |
39
|
|
|
|
|
|
|
'validate' => 'string', |
40
|
|
|
|
|
|
|
}, |
41
|
|
|
|
|
|
|
'sort' => { |
42
|
|
|
|
|
|
|
'in' => 'query', |
43
|
|
|
|
|
|
|
'required' => 0, |
44
|
|
|
|
|
|
|
'validate' => 'string', |
45
|
|
|
|
|
|
|
}, |
46
|
|
|
|
|
|
|
}; |
47
|
|
|
|
|
|
|
|
48
|
0
|
|
|
|
|
|
return $self->_request( '', \%params, $request_params, { type => 'get', oid => '/ssh_keys#get' } ); |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
0
|
|
|
0
|
1
|
|
sub create ($self, %params) { |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
52
|
0
|
|
|
|
|
|
my $request_params = {}; |
53
|
0
|
|
|
|
|
|
return $self->_request( '', \%params, $request_params, { type => 'post', oid => '/ssh_keys#post' } ); |
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
|
56
|
0
|
|
|
0
|
1
|
|
sub delete ($self, %params) { |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
57
|
0
|
|
|
|
|
|
my $request_params = { |
58
|
|
|
|
|
|
|
'id' => { |
59
|
|
|
|
|
|
|
'in' => 'path', |
60
|
|
|
|
|
|
|
'required' => 1, |
61
|
|
|
|
|
|
|
'validate' => 'int64', |
62
|
|
|
|
|
|
|
}, |
63
|
|
|
|
|
|
|
}; |
64
|
|
|
|
|
|
|
|
65
|
0
|
|
|
|
|
|
return $self->_request( '/:id', \%params, $request_params, { type => 'delete', oid => '/ssh_keys/{id}#delete' } ); |
66
|
|
|
|
|
|
|
} |
67
|
|
|
|
|
|
|
|
68
|
0
|
|
|
0
|
1
|
|
sub get ($self, %params) { |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
69
|
0
|
|
|
|
|
|
my $request_params = { |
70
|
|
|
|
|
|
|
'id' => { |
71
|
|
|
|
|
|
|
'in' => 'path', |
72
|
|
|
|
|
|
|
'required' => 1, |
73
|
|
|
|
|
|
|
'validate' => 'int64', |
74
|
|
|
|
|
|
|
}, |
75
|
|
|
|
|
|
|
}; |
76
|
|
|
|
|
|
|
|
77
|
0
|
|
|
|
|
|
return $self->_request( '/:id', \%params, $request_params, { type => 'get', oid => '/ssh_keys/{id}#get' } ); |
78
|
|
|
|
|
|
|
} |
79
|
|
|
|
|
|
|
|
80
|
0
|
|
|
0
|
1
|
|
sub put ($self, %params) { |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
81
|
0
|
|
|
|
|
|
my $request_params = { |
82
|
|
|
|
|
|
|
'id' => { |
83
|
|
|
|
|
|
|
'in' => 'path', |
84
|
|
|
|
|
|
|
'required' => 1, |
85
|
|
|
|
|
|
|
'validate' => 'int64', |
86
|
|
|
|
|
|
|
}, |
87
|
|
|
|
|
|
|
}; |
88
|
|
|
|
|
|
|
|
89
|
0
|
|
|
|
|
|
return $self->_request( '/:id', \%params, $request_params, { type => 'put', oid => '/ssh_keys/{id}#put' } ); |
90
|
|
|
|
|
|
|
} |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
1; |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
__END__ |