| 1 | import type * as binaryauthorization from "@distilled.cloud/gcp/binaryauthorization_v1"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { RuntimeContext } from "../../RuntimeContext.ts"; |
| 5 | import type { Attestor } from "./Attestor.ts"; |
| 6 | |
| 7 | export interface GetAttestorRequest extends Omit< |
| 8 | binaryauthorization.GetProjectsAttestorsRequest, |
| 9 | "name" |
| 10 | > {} |
| 11 | |
| 12 | /** |
| 13 | * Runtime binding for Binary Authorization `attestors.get`. |
| 14 | * |
| 15 | * Bind this operation to an {@link Attestor} in a Function/Action init |
| 16 | * phase. Provide {@link GetAttestorHttp}. |
| 17 | * |
| 18 | * ### Reading an Attestor |
| 19 | * **Example:** Get the bound attestor |
| 20 | * ```typescript |
| 21 | * const getAttestor = yield* GCP.BinaryAuthorization.GetAttestor(attestor); |
| 22 | * const live = yield* getAttestor(); |
| 23 | * ``` |
| 24 | * |
| 25 | * @binding |
| 26 | * @category BinaryAuthorization |
| 27 | */ |
| 28 | export interface GetAttestor extends Binding.Service< |
| 29 | GetAttestor, |
| 30 | "GCP.BinaryAuthorization.GetAttestor", |
| 31 | ( |
| 32 | attestor: Attestor, |
| 33 | ) => Effect.Effect< |
| 34 | ( |
| 35 | request?: GetAttestorRequest, |
| 36 | ) => Effect.Effect< |
| 37 | binaryauthorization.Attestor, |
| 38 | binaryauthorization.GetProjectsAttestorsError, |
| 39 | RuntimeContext |
| 40 | > |
| 41 | > |
| 42 | > {} |
| 43 | |
| 44 | export const GetAttestor = Binding.Service<GetAttestor>( |
| 45 | "GCP.BinaryAuthorization.GetAttestor", |
| 46 | ); |