line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
3
|
|
|
3
|
|
9
|
use utf8; |
|
3
|
|
|
|
|
3
|
|
|
3
|
|
|
|
|
14
|
|
2
|
|
|
|
|
|
|
package Etcd3::Auth::UserDelete; |
3
|
|
|
|
|
|
|
|
4
|
3
|
|
|
3
|
|
88
|
use strict; |
|
3
|
|
|
|
|
3
|
|
|
3
|
|
|
|
|
43
|
|
5
|
3
|
|
|
3
|
|
15
|
use warnings; |
|
3
|
|
|
|
|
3
|
|
|
3
|
|
|
|
|
51
|
|
6
|
|
|
|
|
|
|
|
7
|
3
|
|
|
3
|
|
9
|
use Moo; |
|
3
|
|
|
|
|
2
|
|
|
3
|
|
|
|
|
11
|
|
8
|
3
|
|
|
3
|
|
535
|
use Types::Standard qw(Str Int Bool HashRef ArrayRef); |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
16
|
|
9
|
3
|
|
|
3
|
|
1588
|
use MIME::Base64; |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
115
|
|
10
|
3
|
|
|
3
|
|
9
|
use JSON; |
|
3
|
|
|
|
|
3
|
|
|
3
|
|
|
|
|
12
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
with 'Etcd3::Role::Actions'; |
13
|
|
|
|
|
|
|
|
14
|
3
|
|
|
3
|
|
281
|
use namespace::clean; |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
16
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
=head1 NAME |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
Etcd3::Auth::UserDelete |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=cut |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
our $VERSION = '0.001'; |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=head1 DESCRIPTION |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
Delete user |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=head2 endpoint |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=cut |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
has endpoint => ( |
33
|
|
|
|
|
|
|
is => 'ro', |
34
|
|
|
|
|
|
|
isa => Str, |
35
|
|
|
|
|
|
|
default => '/auth/user/delete' |
36
|
|
|
|
|
|
|
); |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=head2 name |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
name of user |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=cut |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
has name => ( |
45
|
|
|
|
|
|
|
is => 'ro', |
46
|
|
|
|
|
|
|
isa => Str, |
47
|
|
|
|
|
|
|
required => 1, |
48
|
|
|
|
|
|
|
); |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head2 json_args |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
arguments that will be sent to the api |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=cut |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
has json_args => ( |
57
|
|
|
|
|
|
|
is => 'lazy', |
58
|
|
|
|
|
|
|
); |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
sub _build_json_args { |
61
|
0
|
|
|
0
|
|
|
my ($self) = @_; |
62
|
0
|
|
|
|
|
|
my $args; |
63
|
0
|
|
|
|
|
|
for my $key ( keys %{ $self }) { |
|
0
|
|
|
|
|
|
|
64
|
0
|
0
|
|
|
|
|
unless ( $key =~ /(?:_client|json_args|endpoint)$/ ) { |
65
|
0
|
|
|
|
|
|
$args->{$key} = $self->{$key}; |
66
|
|
|
|
|
|
|
} |
67
|
|
|
|
|
|
|
} |
68
|
0
|
|
|
|
|
|
return to_json($args); |
69
|
|
|
|
|
|
|
} |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=head2 init |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=cut |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
sub init { |
76
|
0
|
|
|
0
|
1
|
|
my ($self) = @_; |
77
|
0
|
|
|
|
|
|
my $init = $self->json_args; |
78
|
0
|
0
|
|
|
|
|
$init or return; |
79
|
0
|
|
|
|
|
|
return $self; |
80
|
|
|
|
|
|
|
} |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
1; |