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

main
ts 47 lines 1.45 KB
Raw
1 import type * as redis from "@distilled.cloud/gcp/redis_v1";
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 { Instance } from "./Instance.ts";
6
7 export interface GetAuthStringRequest extends Omit<
8 redis.GetAuthStringProjectsLocationsInstancesRequest,
9 "name"
10 > {}
11
12 /**
13 * Runtime binding for Memorystore Redis `instances.getAuthString`.
14 *
15 * Bind this operation to an {@link Instance} in a Function/Action init
16 * phase. Provide {@link GetAuthStringHttp}. If AUTH is not enabled the
17 * response `authString` is empty. `redis.instances.getAuthString` is only
18 * in `roles/redis.admin`, so the host is granted that role on the project
19 * under an IAM Condition matching the bound instance.
20 *
21 * ### Reading AUTH
22 * **Example:** Fetch the AUTH string
23 * ```typescript
24 * const getAuthString = yield* GCP.Redis.GetAuthString(cache);
25 * const { authString } = yield* getAuthString();
26 * ```
27 *
28 * @binding
29 * @category Redis
30 */
31 export interface GetAuthString extends Binding.Service<
32 GetAuthString,
33 "GCP.Redis.GetAuthString",
34 (
35 instance: Instance,
36 ) => Effect.Effect<
37 (
38 request?: GetAuthStringRequest,
39 ) => Effect.Effect<
40 redis.InstanceAuthString,
41 redis.GetAuthStringProjectsLocationsInstancesError,
42 RuntimeContext
43 >
44 >
45 > {}
46
47 export const GetAuthString = Binding.Service<GetAuthString>("GCP.Redis.GetAuthString");