-
Notifications
You must be signed in to change notification settings - Fork 1
/
objectstorage
executable file
·27 lines (24 loc) · 1.14 KB
/
objectstorage
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
#!/usr/bin/env php
<?php
require_once(__DIR__ . "/../vendor/autoload.php");
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->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();