@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 48 lines 1.4 KB
Raw
1 import type * as ecrpublic from "@distilled.cloud/aws/ecr-public";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { PublicRepository } from "./Repository.ts";
5
6 /** Request for {@link UploadLayerPart} — `repositoryName` is injected. */
7 export interface UploadLayerPartRequest extends Omit<
8 ecrpublic.UploadLayerPartRequest,
9 "repositoryName"
10 > {}
11
12 /**
13 * Runtime binding for `ecr-public:UploadLayerPart`.
14 *
15 * Uploads one chunk of an in-flight image layer upload to the bound
16 * {@link PublicRepository}. Provide the implementation with
17 * `Effect.provide(AWS.ECRPublic.UploadLayerPartHttp)`.
18 *
19 * ### Pushing Images
20 * **Example:** Upload A Layer Part
21 * ```typescript
22 * // init
23 * const uploadLayerPart = yield* AWS.ECRPublic.UploadLayerPart(repository);
24 *
25 * // runtime
26 * yield* uploadLayerPart({
27 * uploadId,
28 * partFirstByte: 0,
29 * partLastByte: blob.byteLength - 1,
30 * layerPartBlob: blob,
31 * });
32 * ```
33 *
34 * @binding
35 */
36 export interface UploadLayerPart extends Binding.Service<
37 UploadLayerPart,
38 "AWS.ECRPublic.UploadLayerPart",
39 <R extends PublicRepository>(
40 repository: R,
41 ) => Effect.Effect<
42 (
43 request: UploadLayerPartRequest,
44 ) => Effect.Effect<ecrpublic.UploadLayerPartResponse, ecrpublic.UploadLayerPartError>
45 >
46 > {}
47
48 export const UploadLayerPart = Binding.Service<UploadLayerPart>("AWS.ECRPublic.UploadLayerPart");