codenamephp/platform.secretsmanager.googlesecretsmanager
最新稳定版本:1.0.0
Composer 安装命令:
composer require codenamephp/platform.secretsmanager.googlesecretsmanager
包简介
README 文档
README
Installation
Easiest way is via composer. Just run composer require codenamephp/platform.secretsManager.googleSecretsManager in your cli which should install the latest
version for you.
Usage
Just create a client using the factory and start fetching secrets. Note that you need to have a google authentication setup. Since we just use the google client by default the instructions from Google apply: https://github.com/googleapis/google-cloud-php/blob/main/AUTHENTICATION.md
You can also pass the path to the credentials file to the factory if you so prefer. Whatever string you pass to the factory is just passed on to the google client so it can do its thing. So check the google doc for details.
use de\codenamephp\platform\secretsManager\googleSecretsManager\Client\Factory\WithGoogleSecretsManagerClient; $client = (new WithGoogleSecretsManagerClient())->build(); $client = (new WithGoogleSecretsManagerClient())->build('/path/to/credentials.json'); // payload is fetched as string $payload = $client->fetchPayload(new \de\codenamephp\platform\secretsManager\base\Secret\Sealed('mySecret', 'myProject')); //fetch the latest version $payload = $client->fetchPayload(new \de\codenamephp\platform\secretsManager\base\Secret\Sealed('mySecret', 'myProject', '3')); //fetch a specific version
统计信息
- 总下载量: 541
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Apache-2.0
- 更新时间: 2023-03-13