| 1 | import * as S3 from "@distilled.cloud/aws/s3"; |
| 2 | import * as Layer from "effect/Layer"; |
| 3 | import { makeRailwayS3Binding } from "./BucketBinding.ts"; |
| 4 | import { ListObjectsV2 } from "./ListObjectsV2.ts"; |
| 5 | |
| 6 | /** |
| 7 | * HTTP implementation of {@link ListObjectsV2}. Calls distilled S3 |
| 8 | * `listObjectsV2` against the Railway endpoint with the bucket's credentials. |
| 9 | * |
| 10 | * @layer |
| 11 | * @product Bucket |
| 12 | * @provides Railway.ListObjectsV2 |
| 13 | */ |
| 14 | export const ListObjectsV2Http = Layer.effect( |
| 15 | ListObjectsV2, |
| 16 | makeRailwayS3Binding({ |
| 17 | tag: "Railway.ListObjectsV2", |
| 18 | operation: S3.listObjectsV2, |
| 19 | }), |
| 20 | ); |