| 1 | 9 | ▶ | use utf8; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 2 | package Net::Etcd::User::Role; | ||
| 3 | |||
| 4 | 9 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 9 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | |||
| 7 | 9 | ▶ | use Moo; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | 9 | ▶ | use Types::Standard qw(Str Int Bool HashRef ArrayRef); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | |||
| 10 | 9 | with 'Net::Etcd::Role::Actions'; | |
| 11 | |||
| 12 | 9 | ▶ | use namespace::clean; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 13 | |||
| 14 | =head1 NAME | ||
| 15 | |||
| 16 | Net::Etcd::User::Role | ||
| 17 | |||
| 18 | =cut | ||
| 19 | |||
| 20 | 9 | our $VERSION = '0.020'; | |
| 21 | |||
| 22 | =head1 DESCRIPTION | ||
| 23 | |||
| 24 | Use role | ||
| 25 | |||
| 26 | =cut | ||
| 27 | |||
| 28 | =head1 ACCESSORS | ||
| 29 | |||
| 30 | =head2 endpoint | ||
| 31 | |||
| 32 | =cut | ||
| 33 | |||
| 34 | 9 | has endpoint => ( | |
| 35 | is => 'ro', | ||
| 36 | isa => Str, | ||
| 37 | ); | ||
| 38 | |||
| 39 | =head2 user | ||
| 40 | |||
| 41 | name of user | ||
| 42 | |||
| 43 | =cut | ||
| 44 | |||
| 45 | 9 | has user => ( | |
| 46 | is => 'ro', | ||
| 47 | isa => Str, | ||
| 48 | ); | ||
| 49 | |||
| 50 | =head2 name | ||
| 51 | |||
| 52 | name of user | ||
| 53 | |||
| 54 | =cut | ||
| 55 | |||
| 56 | 9 | has name => ( | |
| 57 | is => 'ro', | ||
| 58 | isa => Str, | ||
| 59 | ); | ||
| 60 | |||
| 61 | =head2 role | ||
| 62 | |||
| 63 | name of role | ||
| 64 | |||
| 65 | =cut | ||
| 66 | |||
| 67 | 9 | has role => ( | |
| 68 | is => 'ro', | ||
| 69 | isa => Str, | ||
| 70 | ); | ||
| 71 | |||
| 72 | =head1 PUBLIC METHODS | ||
| 73 | |||
| 74 | =head2 grant | ||
| 75 | |||
| 76 | =cut | ||
| 77 | |||
| 78 | sub grant { | ||
| 79 | 0 | ▶ | my $self = shift; |
|
Subroutine
grant: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 80 | 0 | $self->{endpoint} = '/auth/user/grant'; | |
| 81 | 0 | $self->request; | |
| 82 | 0 | return $self; | |
| 83 | } | ||
| 84 | |||
| 85 | =head2 revoke | ||
| 86 | |||
| 87 | =cut | ||
| 88 | |||
| 89 | sub revoke { | ||
| 90 | 0 | ▶ | my $self = shift; |
|
Subroutine
revoke: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 91 | 0 | $self->{endpoint} = '/auth/user/revoke'; | |
| 92 | 0 | $self->request; | |
| 93 | 0 | return $self; | |
| 94 | } | ||
| 95 | |||
| 96 | 9 | 1; | |