Skip to content

Commit 8df540e

Browse files
authored
Add more kms samples, refactors to commands (GoogleCloudPlatform#305)
1 parent d224d7b commit 8df540e

23 files changed

+2407
-412
lines changed

kms/api/README.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,16 @@ These samples show how to use the [Google Cloud KMS API]
1818
4. **Install dependencies** via [Composer](http://getcomposer.org/doc/00-intro.md).
1919
Run `php composer.phar install` (if composer is installed locally) or `composer install`
2020
(if composer is installed globally).
21-
5. **Run**:
22-
```sh
23-
$ php create_keyring.php
24-
Usage: create_keyring.php [project_id] [name]
25-
$ php create_cryptokey.php
26-
Usage: create_cryptokey.php [project_id] [keyring] [name]
27-
$ php encrypt.php
28-
Usage: encrypt.php [key_name] [infile] [outfile]
29-
$ php decrypt.php
30-
Usage: decrypt.php [key_name] [infile] [outfile]
21+
5. Run `php kms.php`. The following commands are available:
22+
23+
```sh
24+
encryption Manage encryption for KMS
25+
iam Manage IAM for KMS
26+
key Manage keys for KMS
27+
keyring Manage keyrings for KMS
28+
version Manage key versions for KMS
3129
```
30+
6. Run `php kms.php COMMAND --help` to print information about the usage of each command.
3231

3332
## Contributing changes
3433

kms/api/composer.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
{
22
"require": {
3-
"google/apiclient": "^2.1"
3+
"google/apiclient": "^2.1",
4+
"symfony/console": " ^3.0"
45
},
5-
"require-dev": {
6-
"symfony/process": "^3.2"
6+
"autoload": {
7+
"psr-4": { "Google\\Cloud\\Samples\\Kms\\": "src" },
8+
"files": [
9+
"src/functions.php"
10+
]
711
}
812
}

kms/api/composer.lock

Lines changed: 142 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

kms/api/create_cryptokey.php

Lines changed: 0 additions & 62 deletions
This file was deleted.

kms/api/create_keyring.php

Lines changed: 0 additions & 57 deletions
This file was deleted.

0 commit comments

Comments
 (0)