承接 codenamephp/platform.secretsmanager.googlesecretsmanager 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

codenamephp/platform.secretsmanager.googlesecretsmanager

最新稳定版本:1.0.0

Composer 安装命令:

composer require codenamephp/platform.secretsmanager.googlesecretsmanager

包简介

README 文档

README

Packagist Version Packagist PHP Version Support Lines of code GitHub code size in bytes CI Packagist Downloads GitHub

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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2023-03-13