blib/lib/IO/Iron/IronCache/Api.pm

filter: Statementstmt 55.5% 10 / 18 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 38.4% 5 / 13 Podpod 100% 8 / 8 totaltotal 58.9% 23 / 39 SCAR 0.8
CC
1
Cov
56%
IRONCACHE_LIST_CACHES
2.0
IRONCACHE_GET_INFO_ABOUT_A_CACHE
2.0
IRONCACHE_DELETE_A_CACHE
2.0
CRAP 1.1
« integ_t/iron_io_integ_tests_common.pl ↑ Summary blib/lib/IO/Iron.pm »
1 package IO::Iron::IronCache::Api;
2  
3 ## no critic (Documentation::RequirePodAtEnd)
4 ## no critic (Documentation::RequirePodSections)
5  
6 6 ▶use 5.010_000;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 6 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 6 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 # Global Creator
11 ▶BEGIN {
Subroutine BEGIN: called CC=1 SCAR=0.0
12 }
13  
14 # Global Destructor
15 ▶END {
Subroutine END: called CC=1 SCAR=0.0
16 }
17  
18  
19 # ABSTRACT: IronCache API reference for Perl Client Libraries!
20  
21 6 our $VERSION = '0.13'; # VERSION: generated by DZP::OurPkgVersion
22  
23  
24  
25  
26  
27 sub IRONCACHE_LIST_CACHES {
28 return {
29 0 ▶ 'action_name' => 'IRONCACHE_LIST_CACHES',
Subroutine IRONCACHE_LIST_CACHES: not called CC=1 SCAR=6.9
Pod documented
30 'href' => '{Protocol}://{Host}:{Port}/{API Version}/projects/{Project ID}/caches',
31 'action' => 'GET',
32 'return' => 'LIST',
33 'retry' => 0,
34 'require_body' => 0,
35 'paged' => 1,
36 'per_page' => 100,
37 'url_escape' => { '{Project ID}' => 1 },
38 'log_message' => '(project={Project ID}). Listed caches.',
39 };
40 }
41  
42  
43 sub IRONCACHE_GET_INFO_ABOUT_A_CACHE {
44 return {
45 0 ▶ 'action_name' => 'IRONCACHE_GET_INFO_ABOUT_A_CACHE',
Subroutine IRONCACHE_GET_INFO_ABOUT_A_CACHE: not called CC=1 SCAR=6.9
Pod documented
46 'href' => '{Protocol}://{Host}:{Port}/{API Version}/projects/{Project ID}/caches/{Cache Name}',
47 'action' => 'GET',
48 'return' => 'HASH',
49 'retry' => 1,
50 'require_body' => 0,
51 'url_escape' => { '{Project ID}' => 1, '{Cache Name}' => 1 },
52 'log_message' => '(project={Project ID}, cache={Cache Name}). Got info about a cache.',
53 };
54 }
55  
56  
57 sub IRONCACHE_DELETE_A_CACHE {
58 return {
59 0 ▶ 'action_name' => 'IRONCACHE_DELETE_A_CACHE',
Subroutine IRONCACHE_DELETE_A_CACHE: not called CC=1 SCAR=6.9
Pod documented
60 'href' => '{Protocol}://{Host}:{Port}/{API Version}/projects/{Project ID}/caches/{Cache Name}',
61 'action' => 'DELETE',
62 'return' => 'MESSAGE',
63 'retry' => 1,
64 'require_body' => 0,
65 'url_escape' => { '{Project ID}' => 1, '{Cache Name}' => 1 },
66 'log_message' => '(project={Project ID}, cache={Cache Name}). Deleted cache.',
67 };
68 }
69  
70  
71 sub IRONCACHE_CLEAR_A_CACHE {
72 return {
73 0 ▶ 'action_name' => 'IRONCACHE_CLEAR_A_CACHE',
Subroutine IRONCACHE_CLEAR_A_CACHE: not called CC=1 SCAR=6.9
Pod documented
74 'href' => '{Protocol}://{Host}:{Port}/{API Version}/projects/{Project ID}/caches/{Cache Name}/clear',
75 'action' => 'POST',
76 'return' => 'MESSAGE',
77 'retry' => 0,
78 'require_body' => 0,
79 'paged' => 0,
80 'per_page' => 0,
81 'url_escape' => { '{Project ID}' => 1, '{Cache Name}' => 1 },
82 'log_message' => '(project={Project ID}, cache={Cache Name}). Cleared cache.',
83 };
84 }
85  
86  
87 sub IRONCACHE_PUT_AN_ITEM_INTO_A_CACHE {
88 return {
89 0 ▶ 'action_name' => 'IRONCACHE_PUT_AN_ITEM_INTO_A_CACHE',
Subroutine IRONCACHE_PUT_AN_ITEM_INTO_A_CACHE: not called CC=1 SCAR=6.9
Pod documented
90 'href' => '{Protocol}://{Host}:{Port}/{API Version}/projects/{Project ID}/caches/{Cache Name}/items/{Key}',
91 'action' => 'PUT',
92 'return' => 'MESSAGE',
93 'retry' => 0,
94 'require_body' => 1,
95 'paged' => 0,
96 'per_page' => 0,
97 'request_fields' => {'value' => '{Value}', 'expires_in' => '{Expires In}', 'replace' => '{Replace}', 'add' => '{Put}', 'cas' => '{Cas}'},
98 'url_escape' => { '{Project ID}' => 1, '{Cache Name}' => 1, '{Key}' => 1 },
99 'log_message' => '(project={Project ID}, cache={Cache Name}, item={Key}). Put item into cache. Value: \'{Value}\', Expires in: \'{Expires In}\', Replace: \'{Replace}\', Put: \'{Put}\', Cas: \'{Cas}\'.',
100 };
101 }
102  
103  
104 sub IRONCACHE_INCREMENT_AN_ITEMS_VALUE {
105 return {
106 0 ▶ 'action_name' => 'IRONCACHE_INCREMENT_AN_ITEMS_VALUE',
Subroutine IRONCACHE_INCREMENT_AN_ITEMS_VALUE: not called CC=1 SCAR=6.9
Pod documented
107 'href' => '{Protocol}://{Host}:{Port}/{API Version}/projects/{Project ID}/caches/{Cache Name}/items/{Key}/increment',
108 'action' => 'POST',
109 'return' => 'HASH',
110 'retry' => 0,
111 'require_body' => 1,
112 'paged' => 0,
113 'per_page' => 0,
114 'request_fields' => {'amount' => '{Amount}'},
115 'url_escape' => { '{Project ID}' => 1, '{Cache Name}' => 1, '{Key}' => 1 },
116 'log_message' => '(project={Project ID}, cache={Cache Name}, item={Key}). Incremented items value by \'{Amount}\'.',
117 };
118 }
119  
120  
121 sub IRONCACHE_GET_AN_ITEM_FROM_A_CACHE {
122 return {
123 0 ▶ 'action_name' => 'IRONCACHE_GET_AN_ITEM_FROM_A_CACHE',
Subroutine IRONCACHE_GET_AN_ITEM_FROM_A_CACHE: not called CC=1 SCAR=6.9
Pod documented
124 'href' => '{Protocol}://{Host}:{Port}/{API Version}/projects/{Project ID}/caches/{Cache Name}/items/{Key}',
125 'action' => 'GET',
126 'return' => 'HASH',
127 'retry' => 0,
128 'require_body' => 0,
129 'url_escape' => { '{Project ID}' => 1, '{Cache Name}' => 1, '{Key}' => 1 },
130 'log_message' => '(project={Project ID}, cache={Cache Name}, item={Key}). Got item from cache.',
131 };
132 }
133  
134  
135 sub IRONCACHE_DELETE_AN_ITEM_FROM_A_CACHE {
136 return {
137 0 ▶ 'action_name' => 'IRONCACHE_DELETE_AN_ITEM_FROM_A_CACHE',
Subroutine IRONCACHE_DELETE_AN_ITEM_FROM_A_CACHE: not called CC=1 SCAR=6.9
Pod documented
138 'href' => '{Protocol}://{Host}:{Port}/{API Version}/projects/{Project ID}/caches/{Cache Name}/items/{Key}',
139 'action' => 'DELETE',
140 'return' => 'MESSAGE',
141 'retry' => 0,
142 'require_body' => 0,
143 'url_escape' => { '{Project ID}' => 1, '{Cache Name}' => 1, '{Key}' => 1 },
144 'log_message' => '(project={Project ID}, cache={Cache Name}, item={Key}). Deleted item from cache.',
145 };
146 }
147  
148 6 1;
149  
150 __END__
« integ_t/iron_io_integ_tests_common.pl ↑ Summary blib/lib/IO/Iron.pm »