generated from spatie/package-skeleton-php
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEndpoint.php
66 lines (61 loc) · 2.04 KB
/
Endpoint.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<?php
namespace CleaniqueCoders\KongAdminApi\Enums;
use CleaniqueCoders\KongAdminApi\Contracts\Enum;
enum Endpoint: string implements Enum
{
case SERVICES = 'services';
case ROUTES = 'routes';
case PLUGINS = 'plugins';
case CONSUMERS = 'consumers';
case CERTIFICATES = 'certificates';
case SNIS = 'snis';
case CA_CERTIFICATES = 'ca_certificates';
case UPSTREAMS = 'upstreams';
case VAULTS = 'vaults';
case KEYS = 'keys';
case KEY_SETS = 'key_sets';
case INFORMATION = 'information';
case DEBUG = 'debug';
case TARGETS = 'targets';
case TAGS = 'tags';
public function label(): string
{
return match ($this) {
self::SERVICES => 'Services',
self::ROUTES => 'Routes',
self::PLUGINS => 'Plugins',
self::CONSUMERS => 'Consumers',
self::CERTIFICATES => 'Certificates',
self::SNIS => 'SNIs',
self::CA_CERTIFICATES => 'CA Certificates',
self::UPSTREAMS => 'Upstreams',
self::VAULTS => 'Vaults',
self::KEYS => 'Keys',
self::KEY_SETS => 'Key-sets',
self::INFORMATION => 'Information',
self::DEBUG => 'Debug',
self::TARGETS => 'Targets',
self::TAGS => 'Tags',
};
}
public function description(): string
{
return match ($this) {
self::SERVICES => 'Gateway services',
self::ROUTES => 'Gateway routes',
self::PLUGINS => 'Plugins',
self::CONSUMERS => 'Consumers',
self::CERTIFICATES => 'Certificates',
self::SNIS => 'SNIs',
self::CA_CERTIFICATES => 'CA certificates',
self::UPSTREAMS => 'Upstreams',
self::VAULTS => 'Vaults',
self::KEYS => 'Keys',
self::KEY_SETS => 'Key-sets',
self::INFORMATION => 'Information routes',
self::DEBUG => 'Debug routes',
self::TARGETS => 'Target routes',
self::TAGS => 'Tag routes',
};
}
}