Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
303 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
<?php | ||
|
||
namespace BackblazeB2; | ||
|
||
class Key | ||
{ | ||
const PERMISSION_LIST_KEYS = 'listKeys'; | ||
const PERMISSION_WRITE_KEYS = 'writeKeys'; | ||
const PERMISSION_DELETE_KEYS = 'deleteKeys'; | ||
const PERMISSION_LIST_BUCKETS = 'listBuckets'; | ||
const PERMISSION_WRITE_BUCKETS = 'writeBuckets'; | ||
const PERMISSION_DELETE_BUCKETS = 'deleteBuckets'; | ||
const PERMISSION_LIST_FILES = 'listFiles'; | ||
const PERMISSION_READ_FILES = 'readFiles'; | ||
const PERMISSION_SHARE_FILES = 'shareFiles'; | ||
const PERMISSION_WRITE_FILES = 'writeFiles'; | ||
const PERMISSION_DELETE_FILES = 'deleteFiles'; | ||
|
||
protected $id; | ||
protected $name; | ||
protected $secret; | ||
protected $capabilities; | ||
protected $bucketId; | ||
protected $namePrefix; | ||
protected $expirationTimestamp; | ||
|
||
/** | ||
* Key constructor. | ||
* | ||
* @param $id | ||
* @param $name | ||
* @param $secret | ||
*/ | ||
public function __construct($id, $name, $secret, $capabilities, $bucketId, $namePrefix, $expirationTimestamp) | ||
{ | ||
$this->id = $id; | ||
$this->name = $name; | ||
$this->secret = $secret; | ||
$this->capabilities = $capabilities; | ||
$this->bucketId = $bucketId; | ||
$this->namePrefix = $namePrefix; | ||
$this->expirationTimestamp = $expirationTimestamp; | ||
} | ||
|
||
public function getId() | ||
{ | ||
return $this->id; | ||
} | ||
|
||
public function getName() | ||
{ | ||
return $this->name; | ||
} | ||
|
||
public function getSecret() | ||
{ | ||
return $this->secret; | ||
} | ||
|
||
public function getCapabilities() | ||
{ | ||
return $this->capabilities; | ||
} | ||
|
||
public function getBucketId() | ||
{ | ||
return $this->bucketId; | ||
} | ||
|
||
public function getNamePrefix() | ||
{ | ||
return $this->namePrefix; | ||
} | ||
|
||
public function getExpirationTimestamp() | ||
{ | ||
return $this->expirationTimestamp; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,19 @@ | ||
{ | ||
"bucketId" : "4a48fe8875c6214145260818", | ||
"accountId" : "010203040506", | ||
"bucketName" : "Test bucket", | ||
"bucketType" : "allPublic" | ||
} | ||
"bucketId": "4a48fe8875c6214145260818", | ||
"accountId": "010203040506", | ||
"bucketName": "Test bucket", | ||
"bucketType": "allPublic", | ||
|
||
"bucketInfo": [], | ||
"corsRules": [], | ||
"defaultFileLockConfiguration": { | ||
"mode": null, | ||
"period": null, | ||
"status": "disabled" | ||
}, | ||
"lifecycleRules": [], | ||
"options": [ | ||
"s3" | ||
], | ||
"revision": 2 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.