1import * as pubsub from "@distilled.cloud/gcp/pubsub_v1";
2import * as Layer from "effect/Layer";
3import { makeTopicHttpBinding } from "./BindingHttp.ts";
4import { Publish } from "./Publish.ts";
5
6/**
7 * HTTP implementation of {@link Publish}.
8 *
9 * @layer
10 * @provides GCP.PubSub.Publish
11 */
12export const PublishHttp = Layer.effect(
13 Publish,
14 makeTopicHttpBinding({
15 tag: "GCP.PubSub.Publish",
16 iam: { role: "roles/pubsub.publisher", on: "pubsub.topic" },
17 operation: pubsub.publishProjectsTopics,
18 }),
19);