| 1 | import * as Layer from "effect/Layer"; |
| 2 | import { ReadSecret } from "./ReadSecret.ts"; |
| 3 | import { makeSecretAccessBinding, readSecretGrants } from "./SecretHttp.ts"; |
| 4 | |
| 5 | /** |
| 6 | * HTTP implementation of {@link ReadSecret} over the Secret Manager REST API. |
| 7 | * |
| 8 | * @layer |
| 9 | * @provides GCP.SecretManager.ReadSecret |
| 10 | * @category SecretManager |
| 11 | */ |
| 12 | export const ReadSecretHttp = Layer.effect( |
| 13 | ReadSecret, |
| 14 | makeSecretAccessBinding({ |
| 15 | tag: "GCP.SecretManager.ReadSecret", |
| 16 | grants: readSecretGrants, |
| 17 | makeClient: (helpers, name) => helpers.makeRead(name), |
| 18 | }), |
| 19 | ); |