https://github.com/codemonument/deno_doppler_client
A doppler.com api client written for deno to be used in deno deploy
https://github.com/codemonument/deno_doppler_client
Last synced: about 1 month ago
JSON representation
A doppler.com api client written for deno to be used in deno deploy
- Host: GitHub
- URL: https://github.com/codemonument/deno_doppler_client
- Owner: codemonument
- License: other
- Created: 2022-10-14T15:16:18.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-04T17:54:50.000Z (over 3 years ago)
- Last Synced: 2025-01-25T15:41:24.583Z (over 1 year ago)
- Language: TypeScript
- Size: 35.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Deno Doppler Client
This Module wraps the doppler.com REST API to provide a thin client sdk in deno
**NOTICE: This Module does not implement the full doppler api right now, but it can safely be used to get secrets from a doppler config :)**
It basically implements the following example flow from the doppler.com website:
https://docs.doppler.com/docs/sdk-javascript
## Getting the secrets for a config
```ts
// Init new Doppler Service with valid token
// You can get a service token here: https://docs.doppler.com/docs/enclave-service-tokens
// (These are valid for 1 Project for 1 Environment but can be valid for multipl configs)
const doppler = new DopplerService({ token: DOPPLER_TOKEN });
// Get all secrets for a specific doppler config
const secrets = await doppler.getSecrets("project-name", "config-name");
console.log(secrets);
// Get one specific secret
const secret = await doppler.retrieveSecret(
"project-name",
"config-name",
"SECRET_NAME",
);
```
## Useful Links
- [Doppler API Reference](https://docs.doppler.com/reference/api)
- [Auth Token Formats](https://docs.doppler.com/reference/auth-token-formats)