@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 04:45 UTC

main
ts 22 lines 798 Bytes
Raw
1 import * as cloudfunctions from "@distilled.cloud/gcp/cloudfunctions_v2";
2 import * as Layer from "effect/Layer";
3 import { makeFunctionHttpBinding } from "./BindingHttp.ts";
4 import { GetFunction } from "./GetFunction.ts";
5
6 /**
7 * HTTP implementation of {@link GetFunction}.
8 *
9 * @layer
10 * @provides GCP.CloudFunctions.GetFunction
11 */
12 export const GetFunctionHttp = Layer.effect(
13 GetFunction,
14 makeFunctionHttpBinding({
15 tag: "GCP.CloudFunctions.GetFunction",
16 // 2nd gen functions accept only invoker roles on their own IAM policy
17 // (anything else is INVALID_ARGUMENT), so grant on the project under a
18 // condition naming the function.
19 iam: { role: "roles/cloudfunctions.viewer", scopeByCondition: true },
20 operation: cloudfunctions.getProjectsLocationsFunctions,
21 }),
22 );