@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, 06:00 UTC

main
ts 27 lines 983 Bytes
Raw
1 import { Credentials } from "@distilled.cloud/gcp/Credentials";
2 import * as kafka from "@distilled.cloud/gcp/managedkafka_v1";
3 import * as HttpClient from "effect/http/HttpClient";
4 import * as Layer from "effect/Layer";
5 import { makeManagedKafkaHttpBinding } from "./BindingHttp.ts";
6 import type { ClustersTopic } from "./ClustersTopic.ts";
7 import { GetTopic } from "./GetTopic.ts";
8
9 /**
10 * HTTP implementation of {@link GetTopic}.
11 *
12 * @layer
13 * @provides GCP.ManagedKafka.GetTopic
14 */
15 export const GetTopicHttp: Layer.Layer<GetTopic, never, Credentials | HttpClient.HttpClient> =
16 Layer.effect(
17 GetTopic,
18 makeManagedKafkaHttpBinding<ClustersTopic>()<
19 kafka.GetProjectsLocationsClustersTopicsRequest,
20 kafka.Topic,
21 kafka.GetProjectsLocationsClustersTopicsError
22 >({
23 tag: "GCP.ManagedKafka.GetTopic",
24 iam: { role: "roles/managedkafka.viewer", scopeByCondition: true },
25 operation: kafka.getProjectsLocationsClustersTopics,
26 }),
27 );