1import * as datastore from "@distilled.cloud/gcp/datastore_v1";
2import * as Layer from "effect/Layer";
3import { makeDatastoreHttpBinding } from "./BindingHttp.ts";
4import { RunQuery } from "./RunQuery.ts";
5
6/**
7 * HTTP implementation of {@link RunQuery}.
8 *
9 * @layer
10 * @provides GCP.Datastore.RunQuery
11 */
12export const RunQueryHttp = Layer.effect(
13 RunQuery,
14 makeDatastoreHttpBinding({
15 tag: "GCP.Datastore.RunQuery",
16 iam: { role: "roles/datastore.viewer", scopeByCondition: true },
17 operation: datastore.runQueryProjects,
18 }),
19);