forked from utopia-php/storage
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExoscale.php
More file actions
66 lines (53 loc) · 1.42 KB
/
Copy pathExoscale.php
File metadata and controls
66 lines (53 loc) · 1.42 KB
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 Utopia\Storage\Device;
use Utopia\Storage\Storage;
class Exoscale extends S3
{
/**
* Exoscale Regions constants
* https://community.exoscale.com/documentation/platform/exoscale-datacenter-zones/
*/
const CH_GVA_2 = 'ch-gva-2';
const CH_DK_2 = 'ch-dk-2';
const DE_FRA_1 = 'de-fra-1';
const DE_MUC_1 = 'de-muc-1';
const AT_VIE_1 = 'at-vie-1';
const AT_VIE_2 = 'at-vie-2';
const BG_SOF_1 = 'bg-sof-1';
/**
* Exoscale Constructor
*
* @param string $root
* @param string $apiKey
* @param string $apiSecret
* @param string $bucket
* @param string $region
* @param string $acl
*/
public function __construct(string $root, string $apiKey, string $apiSecret, string $bucket, string $region = self::CH_GVA_2, string $acl = self::ACL_PRIVATE)
{
parent::__construct($root, $apiKey, $apiSecret, $bucket, $region, $acl);
$this->headers['host'] = $bucket.'.'.$region.'.'.'exo.io';
}
/**
* @return string
*/
public function getName(): string
{
return 'Exoscale Simple Object Storage';
}
/**
* @return string
*/
public function getDescription(): string
{
return 'Exoscale Simple Object Storage';
}
/**
* @return string
*/
public function getType(): string
{
return Storage::DEVICE_EXOSCALE;
}
}