@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 37 lines 1.11 KB
Raw
1 import type * as bigtable from "@distilled.cloud/gcp/bigtableadmin_v2";
2 import * as Binding from "alchemy/Binding";
3 import type { RuntimeContext } from "alchemy/RuntimeContext";
4 import type * as Effect from "effect/Effect";
5 import type { Table } from "./Table.ts";
6
7 export interface GetTableRequest extends Omit<bigtable.GetProjectsInstancesTablesRequest, "name"> {}
8
9 /**
10 * Runtime binding for Bigtable Admin `tables.get`.
11 *
12 * Bind this operation to a {@link Table} in a Function/Action init
13 * phase. Provide {@link GetTableHttp}.
14 *
15 * ### Observing Tables
16 * **Example:** Read the bound table
17 * ```typescript
18 * const getTable = yield* GCP.Bigtable.GetTable(users);
19 * const live = yield* getTable({ view: "SCHEMA_VIEW" });
20 * ```
21 *
22 * @binding
23 * @category Bigtable
24 */
25 export interface GetTable extends Binding.Service<
26 GetTable,
27 "GCP.Bigtable.GetTable",
28 (
29 table: Table,
30 ) => Effect.Effect<
31 (
32 request?: GetTableRequest,
33 ) => Effect.Effect<bigtable.Table, bigtable.GetProjectsInstancesTablesError, RuntimeContext>
34 >
35 > {}
36
37 export const GetTable = Binding.Service<GetTable>("GCP.Bigtable.GetTable");