Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from boite/master
Objectstorage v3; now with modern crypto
- Loading branch information
Showing
32 changed files
with
723 additions
and
296 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,8 @@ | |
|
||
.DS_Store | ||
objectstorage.conf | ||
.php_cs.cache | ||
.phpunit.result.cache | ||
|
||
### Eclipse ### | ||
*.pydevproject | ||
|
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,17 @@ | ||
<?php | ||
|
||
$finder = PhpCsFixer\Finder::create() | ||
->in(__DIR__.'/src') | ||
; | ||
|
||
return PhpCsFixer\Config::create() | ||
->setRules([ | ||
'@PSR1' => true, | ||
'@PSR2' => true, | ||
'@Symfony' => true, | ||
'phpdoc_align' => false, | ||
'concat_space' => ['spacing' => 'one'], | ||
'array_syntax' => ['syntax' => 'short'], | ||
]) | ||
->setFinder($finder) | ||
; |
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,17 +1,27 @@ | ||
#!/usr/bin/env php | ||
<?php | ||
|
||
use Symfony\Component\Console\Application; | ||
|
||
require_once(__DIR__ . "/../vendor/autoload.php"); | ||
|
||
$application = new Application('ObjectStorage CLI utility', '1.0.0'); | ||
use ObjectStorage\Command\DecryptCommand; | ||
use ObjectStorage\Command\DeleteCommand; | ||
use ObjectStorage\Command\DownloadCommand; | ||
use ObjectStorage\Command\EncryptCommand; | ||
use ObjectStorage\Command\GenerateKeyCommand; | ||
use ObjectStorage\Command\ListCommand; | ||
use ObjectStorage\Command\UploadCommand; | ||
use Symfony\Component\Console\Application; | ||
use Symfony\Component\Console\CommandLoader\FactoryCommandLoader; | ||
|
||
$application = new Application('ObjectStorage CLI utility', 'v3'); | ||
$application->setCatchExceptions(true); | ||
$application->add(new \ObjectStorage\Command\UploadCommand()); | ||
$application->add(new \ObjectStorage\Command\DownloadCommand()); | ||
$application->add(new \ObjectStorage\Command\ListCommand()); | ||
$application->add(new \ObjectStorage\Command\DeleteCommand()); | ||
$application->add(new \ObjectStorage\Command\GenerateKeyCommand()); | ||
$application->add(new \ObjectStorage\Command\EncryptCommand()); | ||
$application->add(new \ObjectStorage\Command\DecryptCommand()); | ||
$application->setCommandLoader(new FactoryCommandLoader([ | ||
'objectstorage:upload' => function () { return new UploadCommand(); }, | ||
'objectstorage:download' => function () { return new DownloadCommand(); }, | ||
'objectstorage:list' => function () { return new ListCommand(); }, | ||
'objectstorage:delete' => function () { return new DeleteCommand(); }, | ||
'genkey' => function () { return new GenerateKeyCommand(); }, | ||
'encrypt' => function () { return new EncryptCommand(); }, | ||
'decrypt' => function () { return new DecryptCommand(); }, | ||
])); | ||
$application->run(); |
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,27 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<!-- https://phpunit.de/manual/current/en/appendixes.configuration.html --> | ||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/6.5/phpunit.xsd" | ||
backupGlobals="false" | ||
colors="true" | ||
bootstrap="tests/bootstrap.php" | ||
> | ||
<php> | ||
<ini name="error_reporting" value="-1" /> | ||
<server name="APP_ENV" value="test" force="true" /> | ||
<server name="SHELL_VERBOSITY" value="-1" /> | ||
</php> | ||
|
||
<testsuites> | ||
<testsuite name="Project Test Suite"> | ||
<directory>tests</directory> | ||
</testsuite> | ||
</testsuites> | ||
|
||
<filter> | ||
<whitelist> | ||
<directory>src</directory> | ||
</whitelist> | ||
</filter> | ||
</phpunit> |
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,15 @@ | ||
<?php | ||
|
||
namespace ObjectStorage\Adapter; | ||
|
||
interface BuildableAdapterInterface | ||
{ | ||
/** | ||
* Build an instance of the adapter. | ||
* | ||
* @param array $config | ||
* | ||
* @return \ObjectStorage\Adapter\StorageAdapterInterface | ||
*/ | ||
public static function build(array $config); | ||
} |
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.