diff --git a/bun.lock b/bun.lock index 74c9d8e..399f4cc 100644 --- a/bun.lock +++ b/bun.lock @@ -21,6 +21,7 @@ "@effect/platform-bun": "^0.87.1", "@effect/platform-node": "^0.104.1", "openapi-to-effect": "^0.9.3", + "prettier-plugin-jsdoc": "^1.8.0", "tsx": "^4.21.0", "undici": "^7.19.0", }, diff --git a/packages/effect-docker/package.json b/packages/effect-docker/package.json index c55029c..45da091 100644 --- a/packages/effect-docker/package.json +++ b/packages/effect-docker/package.json @@ -41,6 +41,7 @@ "@effect/platform-bun": "^0.87.1", "@effect/platform-node": "^0.104.1", "openapi-to-effect": "^0.9.3", + "prettier-plugin-jsdoc": "^1.8.0", "tsx": "^4.21.0", "undici": "^7.19.0" }, diff --git a/packages/effect-docker/scripts/codegen.ts b/packages/effect-docker/scripts/codegen.ts index 39141a2..3b075aa 100644 --- a/packages/effect-docker/scripts/codegen.ts +++ b/packages/effect-docker/scripts/codegen.ts @@ -29,7 +29,7 @@ const generate = Effect.fn("generate")(function*( const outputDirPath = path.join(tempOutputDirPath, version) yield* fs.makeDirectory(outputDirPath) - run(["gen", specFilePath, outputDirPath]) + yield* Effect.promise(() => run(["gen", specFilePath, outputDirPath])) }) Effect.gen(function*() { diff --git a/packages/effect-docker/src/gen/v1.53/Address.ts b/packages/effect-docker/src/gen/v1.53/Address.ts new file mode 100644 index 0000000..dd2b2c0 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/Address.ts @@ -0,0 +1,13 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +/** Address represents an IPv4 or IPv6 IP address. */ +export const Address = S.Struct({ + /** IP address. */ + Addr: S.optional(S.String), + /** Mask length of the IP address. */ + PrefixLen: S.optional(pipe(S.Number, S.int())), +}); +export type Address = S.Schema.Type; +export const AddressEncoded = S.encodedSchema(Address); +export type AddressEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/AuthConfig.ts b/packages/effect-docker/src/gen/v1.53/AuthConfig.ts new file mode 100644 index 0000000..4f067c6 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/AuthConfig.ts @@ -0,0 +1,11 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +export const AuthConfig = S.Struct({ + username: S.optional(S.String), + password: S.optional(S.String), + serveraddress: S.optional(S.String), +}); +export type AuthConfig = S.Schema.Type; +export const AuthConfigEncoded = S.encodedSchema(AuthConfig); +export type AuthConfigEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/AuthResponse.ts b/packages/effect-docker/src/gen/v1.53/AuthResponse.ts new file mode 100644 index 0000000..1dc0923 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/AuthResponse.ts @@ -0,0 +1,13 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +/** An identity token was generated successfully. */ +export const AuthResponse = S.Struct({ + /** The status of the authentication */ + Status: S.String, + /** An opaque token used to authenticate a user after a successful login */ + IdentityToken: S.optional(S.String), +}); +export type AuthResponse = S.Schema.Type; +export const AuthResponseEncoded = S.encodedSchema(AuthResponse); +export type AuthResponseEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/BuildCache.ts b/packages/effect-docker/src/gen/v1.53/BuildCache.ts new file mode 100644 index 0000000..513687e --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/BuildCache.ts @@ -0,0 +1,43 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +/** BuildCache contains information about a build cache record. */ +export const BuildCache = S.Struct({ + /** Unique ID of the build cache record. */ + ID: S.optional(S.String), + /** List of parent build cache record IDs. */ + Parents: S.optional(S.Array(S.String)), + /** Cache record type. */ + Type: S.optional( + S.Literal( + 'internal', + 'frontend', + 'source.local', + 'source.git.checkout', + 'exec.cachemount', + 'regular', + ), + ), + /** Description of the build-step that produced the build cache. */ + Description: S.optional(S.String), + /** Indicates if the build cache is in use. */ + InUse: S.optional(S.Boolean), + /** Indicates if the build cache is shared. */ + Shared: S.optional(S.Boolean), + /** Amount of disk space used by the build cache (in bytes). */ + Size: S.optional(pipe(S.Number, S.int())), + /** + * Date and time at which the build cache was created in [RFC + * 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + */ + CreatedAt: S.optional(S.String), + /** + * Date and time at which the build cache was last used in [RFC + * 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + */ + LastUsedAt: S.optional(S.String), + UsageCount: S.optional(pipe(S.Number, S.int())), +}); +export type BuildCache = S.Schema.Type; +export const BuildCacheEncoded = S.encodedSchema(BuildCache); +export type BuildCacheEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/BuildCacheDiskUsage.ts b/packages/effect-docker/src/gen/v1.53/BuildCacheDiskUsage.ts new file mode 100644 index 0000000..bec0412 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/BuildCacheDiskUsage.ts @@ -0,0 +1,19 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +/** Represents system data usage for build cache resources. */ +export const BuildCacheDiskUsage = S.Struct({ + /** Count of active build cache records. */ + ActiveCount: S.optional(pipe(S.Number, S.int())), + /** Count of all build cache records. */ + TotalCount: S.optional(pipe(S.Number, S.int())), + /** Disk space that can be reclaimed by removing inactive build cache records. */ + Reclaimable: S.optional(pipe(S.Number, S.int())), + /** Disk space in use by build cache records. */ + TotalSize: S.optional(pipe(S.Number, S.int())), + /** List of build cache records. */ + Items: S.optional(S.Array(S.Struct({}))), +}); +export type BuildCacheDiskUsage = S.Schema.Type; +export const BuildCacheDiskUsageEncoded = S.encodedSchema(BuildCacheDiskUsage); +export type BuildCacheDiskUsageEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/BuildIdentity.ts b/packages/effect-docker/src/gen/v1.53/BuildIdentity.ts new file mode 100644 index 0000000..3261e8b --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/BuildIdentity.ts @@ -0,0 +1,16 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +/** BuildIdentity contains build reference information if image was created via build. */ +export const BuildIdentity = S.Struct({ + /** + * Ref is the identifier for the build request. This reference can be used to look up the build + * details in BuildKit history API. + */ + Ref: S.optional(S.String), + /** CreatedAt is the time when the build ran. */ + CreatedAt: S.optional(S.Date), +}); +export type BuildIdentity = S.Schema.Type; +export const BuildIdentityEncoded = S.encodedSchema(BuildIdentity); +export type BuildIdentityEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/BuildInfo.ts b/packages/effect-docker/src/gen/v1.53/BuildInfo.ts new file mode 100644 index 0000000..6b22dbd --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/BuildInfo.ts @@ -0,0 +1,18 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +import { ErrorDetail } from './ErrorDetail.ts'; +import { ProgressDetail } from './ProgressDetail.ts'; +import { ImageID } from './ImageID.ts'; + +export const BuildInfo = S.Struct({ + id: S.optional(S.String), + stream: S.optional(S.String), + errorDetail: S.optional(ErrorDetail), + status: S.optional(S.String), + progressDetail: S.optional(ProgressDetail), + aux: S.optional(ImageID), +}); +export type BuildInfo = S.Schema.Type; +export const BuildInfoEncoded = S.encodedSchema(BuildInfo); +export type BuildInfoEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/ChangeType.ts b/packages/effect-docker/src/gen/v1.53/ChangeType.ts new file mode 100644 index 0000000..49f8b3a --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/ChangeType.ts @@ -0,0 +1,16 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +/** + * Kind of change + * + * Can be one of: + * + * - `0`: Modified ("C") + * - `1`: Added ("A") + * - `2`: Deleted ("D") + */ +export const ChangeType = S.Literal(0, 1, 2); +export type ChangeType = S.Schema.Type; +export const ChangeTypeEncoded = S.encodedSchema(ChangeType); +export type ChangeTypeEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/ClusterInfo.ts b/packages/effect-docker/src/gen/v1.53/ClusterInfo.ts new file mode 100644 index 0000000..a197d29 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/ClusterInfo.ts @@ -0,0 +1,42 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +import { ObjectVersion } from './ObjectVersion.ts'; +import { SwarmSpec } from './SwarmSpec.ts'; +import { TLSInfo } from './TLSInfo.ts'; + +/** + * ClusterInfo represents information about the swarm as is returned by the "/info" endpoint. + * Join-tokens are not included. + */ +export const ClusterInfo = S.Struct({ + /** The ID of the swarm. */ + ID: S.optional(S.String), + Version: S.optional(ObjectVersion), + /** + * Date and time at which the swarm was initialised in [RFC + * 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + */ + CreatedAt: S.optional(S.String), + /** + * Date and time at which the swarm was last updated in [RFC + * 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + */ + UpdatedAt: S.optional(S.String), + Spec: S.optional(SwarmSpec), + TLSInfo: S.optional(TLSInfo), + /** Whether there is currently a root CA rotation in progress for the swarm */ + RootRotationInProgress: S.optional(S.Boolean), + /** + * DataPathPort specifies the data path port number for data traffic. Acceptable port range is + * 1024 to 49151. If no port is set or is set to 0, the default port (4789) is used. + */ + DataPathPort: S.optional(pipe(S.Number, S.int())), + /** Default Address Pool specifies default subnet pools for global scope networks. */ + DefaultAddrPool: S.optional(S.Array(S.String)), + /** SubnetSize specifies the subnet size of the networks created from the default subnet pool. */ + SubnetSize: S.optional(pipe(S.Number, S.int(), S.lessThanOrEqualTo(29))), +}); +export type ClusterInfo = S.Schema.Type; +export const ClusterInfoEncoded = S.encodedSchema(ClusterInfo); +export type ClusterInfoEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/ClusterVolume.ts b/packages/effect-docker/src/gen/v1.53/ClusterVolume.ts new file mode 100644 index 0000000..b9dd0a9 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/ClusterVolume.ts @@ -0,0 +1,67 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +import { ObjectVersion } from './ObjectVersion.ts'; +import { ClusterVolumeSpec } from './ClusterVolumeSpec.ts'; +import { Topology } from './Topology.ts'; + +/** Options and information specific to, and only present on, Swarm CSI cluster volumes. */ +export const ClusterVolume = S.Struct({ + /** + * The Swarm ID of this volume. Because cluster volumes are Swarm objects, they have an ID, unlike + * non-cluster volumes. This ID can be used to refer to the Volume instead of the name. + */ + ID: S.optional(S.String), + Version: S.optional(ObjectVersion), + CreatedAt: S.optional(S.String), + UpdatedAt: S.optional(S.String), + Spec: S.optional(ClusterVolumeSpec), + /** Information about the global status of the volume. */ + Info: S.optional( + S.Struct({ + /** The capacity of the volume in bytes. A value of 0 indicates that the capacity is unknown. */ + CapacityBytes: S.optional(pipe(S.Number, S.int())), + /** A map of strings to strings returned from the storage plugin when the volume is created. */ + VolumeContext: S.optional(S.Record({ key: S.String, value: S.String })), + /** + * The ID of the volume as returned by the CSI storage plugin. This is distinct from the + * volume's ID as provided by Docker. This ID is never used by the user when communicating with + * Docker to refer to this volume. If the ID is blank, then the Volume has not been successfully + * created in the plugin yet. + */ + VolumeID: S.optional(S.String), + /** The topology this volume is actually accessible from. */ + AccessibleTopology: S.optional(S.Array(Topology)), + }), + ), + /** The status of the volume as it pertains to its publishing and use on specific nodes */ + PublishStatus: S.optional( + S.Array( + S.Struct({ + /** The ID of the Swarm node the volume is published on. */ + NodeID: S.optional(S.String), + /** + * The published state of the volume. `pending-publish` The volume should be published to this + * node, but the call to the controller plugin to do so has not yet been successfully completed. + * `published` The volume is published successfully to the node. `pending-node-unpublish` The + * volume should be unpublished from the node, and the manager is awaiting confirmation from the + * worker that it has done so. `pending-controller-unpublish` The volume is successfully + * unpublished from the node, but has not yet been successfully unpublished on the controller. + */ + State: S.optional( + S.Literal( + 'pending-publish', + 'published', + 'pending-node-unpublish', + 'pending-controller-unpublish', + ), + ), + /** A map of strings to strings returned by the CSI controller plugin when a volume is published. */ + PublishContext: S.optional(S.Record({ key: S.String, value: S.String })), + }), + ), + ), +}); +export type ClusterVolume = S.Schema.Type; +export const ClusterVolumeEncoded = S.encodedSchema(ClusterVolume); +export type ClusterVolumeEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/ClusterVolumeSpec.ts b/packages/effect-docker/src/gen/v1.53/ClusterVolumeSpec.ts new file mode 100644 index 0000000..85cc6dd --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/ClusterVolumeSpec.ts @@ -0,0 +1,113 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +import { Topology } from './Topology.ts'; + +/** Cluster-specific options used to create the volume. */ +export const ClusterVolumeSpec = S.Struct({ + /** + * Group defines the volume group of this volume. Volumes belonging to the same group can be + * referred to by group name when creating Services. Referring to a volume by group instructs + * Swarm to treat volumes in that group interchangeably for the purpose of scheduling. Volumes + * with an empty string for a group technically all belong to the same, emptystring group. + */ + Group: S.optional(S.String), + /** Defines how the volume is used by tasks. */ + AccessMode: S.optional( + S.Struct({ + /** + * The set of nodes this volume can be used on at one time. - `single` The volume may only be + * scheduled to one node at a time. - `multi` the volume may be scheduled to any supported + * number of nodes at a time. + */ + Scope: S.optionalWith(S.Literal('single', 'multi'), { + default: () => 'single', + }), + /** + * The number and way that different tasks can use this volume at one time. - `none` The volume + * may only be used by one task at a time. - `readonly` The volume may be used by any number of + * tasks, but they all must mount the volume as readonly - `onewriter` The volume may be used by + * any number of tasks, but only one may mount it as read/write. - `all` The volume may have any + * number of readers and writers. + */ + Sharing: S.optionalWith(S.Literal('none', 'readonly', 'onewriter', 'all'), { + default: () => 'none', + }), + /** + * Options for using this volume as a Mount-type volume. + * + * Either MountVolume or BlockVolume, but not both, must be + * present. + * properties: + * FsType: + * type: "string" + * description: | + * Specifies the filesystem type for the mount volume. + * Optional. + * MountFlags: + * type: "array" + * description: | + * Flags to pass when mounting the volume. Optional. + * items: + * type: "string" + * BlockVolume: + * type: "object" + * description: | + * Options for using this volume as a Block-type volume. + * Intentionally empty. + */ + MountVolume: S.optional(S.Struct({})), + /** Swarm Secrets that are passed to the CSI storage plugin when operating on this volume. */ + Secrets: S.optional( + S.Array( + S.Struct({ + /** Key is the name of the key of the key-value pair passed to the plugin. */ + Key: S.optional(S.String), + /** + * Secret is the swarm Secret object from which to read data. This can be a Secret name or ID. + * The Secret data is retrieved by swarm and used as the value of the key-value pair passed to + * the plugin. + */ + Secret: S.optional(S.String), + }), + ), + ), + /** + * Requirements for the accessible topology of the volume. These fields are optional. For an + * in-depth description of what these fields mean, see the CSI specification. + */ + AccessibilityRequirements: S.optional( + S.Struct({ + /** A list of required topologies, at least one of which the volume must be accessible from. */ + Requisite: S.optional(S.Array(Topology)), + /** A list of topologies that the volume should attempt to be provisioned in. */ + Preferred: S.optional(S.Array(Topology)), + }), + ), + /** + * The desired capacity that the volume should be created with. If empty, the plugin will decide + * the capacity. + */ + CapacityRange: S.optional( + S.Struct({ + /** The volume must be at least this big. The value of 0 indicates an unspecified minimum */ + RequiredBytes: S.optional(pipe(S.Number, S.int())), + /** The volume must not be bigger than this. The value of 0 indicates an unspecified maximum. */ + LimitBytes: S.optional(pipe(S.Number, S.int())), + }), + ), + /** + * The availability of the volume for use in tasks. - `active` The volume is fully available for + * scheduling on the cluster - `pause` No new workloads should use the volume, but existing + * workloads are not stopped. - `drain` All workloads using this volume should be stopped and + * rescheduled, and no new ones should be started. + */ + Availability: S.optionalWith(S.Literal('active', 'pause', 'drain'), { + default: () => 'active', + }), + }), + ), +}); +export type ClusterVolumeSpec = S.Schema.Type; +export const ClusterVolumeSpecEncoded = S.encodedSchema(ClusterVolumeSpec); +export type ClusterVolumeSpecEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/Commit.ts b/packages/effect-docker/src/gen/v1.53/Commit.ts new file mode 100644 index 0000000..c44953f --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/Commit.ts @@ -0,0 +1,14 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +/** + * Commit holds the Git-commit (SHA1) that a binary was built from, as reported in the + * version-string of external tools, such as `containerd`, or `runC`. + */ +export const Commit = S.Struct({ + /** Actual commit ID of external tool. */ + ID: S.optional(S.String), +}); +export type Commit = S.Schema.Type; +export const CommitEncoded = S.encodedSchema(Commit); +export type CommitEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/Config.ts b/packages/effect-docker/src/gen/v1.53/Config.ts new file mode 100644 index 0000000..2618bc0 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/Config.ts @@ -0,0 +1,16 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +import { ObjectVersion } from './ObjectVersion.ts'; +import { ConfigSpec } from './ConfigSpec.ts'; + +export const Config = S.Struct({ + ID: S.optional(S.String), + Version: S.optional(ObjectVersion), + CreatedAt: S.optional(S.String), + UpdatedAt: S.optional(S.String), + Spec: S.optional(ConfigSpec), +}); +export type Config = S.Schema.Type; +export const ConfigEncoded = S.encodedSchema(Config); +export type ConfigEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/ConfigReference.ts b/packages/effect-docker/src/gen/v1.53/ConfigReference.ts new file mode 100644 index 0000000..1fd6359 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/ConfigReference.ts @@ -0,0 +1,15 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +/** The config-only network source to provide the configuration for this network. */ +export const ConfigReference = S.Struct({ + /** + * The name of the config-only network that provides the network's configuration. The specified + * network must be an existing config-only network. Only network names are allowed, not network + * IDs. + */ + Network: S.optional(S.String), +}); +export type ConfigReference = S.Schema.Type; +export const ConfigReferenceEncoded = S.encodedSchema(ConfigReference); +export type ConfigReferenceEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/ConfigSpec.ts b/packages/effect-docker/src/gen/v1.53/ConfigSpec.ts new file mode 100644 index 0000000..e521c64 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/ConfigSpec.ts @@ -0,0 +1,22 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +import { Driver } from './Driver.ts'; + +export const ConfigSpec = S.Struct({ + /** User-defined name of the config. */ + Name: S.optional(S.String), + /** User-defined key/value metadata. */ + Labels: S.optional(S.Record({ key: S.String, value: S.String })), + /** + * Data is the data to store as a config, formatted as a standard base64-encoded ([RFC + * 4648](https://tools.ietf.org/html/rfc4648#section-4)) string. The maximum allowed size is + * 1000KB, as defined in + * [MaxConfigSize](https://pkg.go.dev/github.com/moby/swarmkit/v2@v2.0.0-20250103191802-8c1959736554/manager/controlapi#MaxConfigSize). + */ + Data: S.optional(S.String), + Templating: S.optional(Driver), +}); +export type ConfigSpec = S.Schema.Type; +export const ConfigSpecEncoded = S.encodedSchema(ConfigSpec); +export type ConfigSpecEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/ContainerBlkioStatEntry.ts b/packages/effect-docker/src/gen/v1.53/ContainerBlkioStatEntry.ts new file mode 100644 index 0000000..6ba3d96 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/ContainerBlkioStatEntry.ts @@ -0,0 +1,17 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +/** + * Blkio stats entry. + * + * This type is Linux-specific and omitted for Windows containers. + */ +export const ContainerBlkioStatEntry = S.Struct({ + major: S.optional(pipe(S.Number, S.int())), + minor: S.optional(pipe(S.Number, S.int())), + op: S.optional(S.String), + value: S.optional(pipe(S.Number, S.int())), +}); +export type ContainerBlkioStatEntry = S.Schema.Type; +export const ContainerBlkioStatEntryEncoded = S.encodedSchema(ContainerBlkioStatEntry); +export type ContainerBlkioStatEntryEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/ContainerBlkioStats.ts b/packages/effect-docker/src/gen/v1.53/ContainerBlkioStats.ts new file mode 100644 index 0000000..113b129 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/ContainerBlkioStats.ts @@ -0,0 +1,54 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +import { ContainerBlkioStatEntry } from './ContainerBlkioStatEntry.ts'; + +/** + * BlkioStats stores all IO service stats for data read and write. + * + * This type is Linux-specific and holds many fields that are specific to cgroups v1. On a cgroup v2 + * host, all fields other than `io_service_bytes_recursive` are omitted or `null`. + * + * This type is only populated on Linux and omitted for Windows containers. + */ +export const ContainerBlkioStats = S.Struct({ + io_service_bytes_recursive: S.optional(S.Array(ContainerBlkioStatEntry)), + /** + * This field is only available when using Linux containers with cgroups v1. It is omitted or + * `null` when using cgroups v2. + */ + io_serviced_recursive: S.optional(S.Array(ContainerBlkioStatEntry)), + /** + * This field is only available when using Linux containers with cgroups v1. It is omitted or + * `null` when using cgroups v2. + */ + io_queue_recursive: S.optional(S.Array(ContainerBlkioStatEntry)), + /** + * This field is only available when using Linux containers with cgroups v1. It is omitted or + * `null` when using cgroups v2. + */ + io_service_time_recursive: S.optional(S.Array(ContainerBlkioStatEntry)), + /** + * This field is only available when using Linux containers with cgroups v1. It is omitted or + * `null` when using cgroups v2. + */ + io_wait_time_recursive: S.optional(S.Array(ContainerBlkioStatEntry)), + /** + * This field is only available when using Linux containers with cgroups v1. It is omitted or + * `null` when using cgroups v2. + */ + io_merged_recursive: S.optional(S.Array(ContainerBlkioStatEntry)), + /** + * This field is only available when using Linux containers with cgroups v1. It is omitted or + * `null` when using cgroups v2. + */ + io_time_recursive: S.optional(S.Array(ContainerBlkioStatEntry)), + /** + * This field is only available when using Linux containers with cgroups v1. It is omitted or + * `null` when using cgroups v2. + */ + sectors_recursive: S.optional(S.Array(ContainerBlkioStatEntry)), +}); +export type ContainerBlkioStats = S.Schema.Type; +export const ContainerBlkioStatsEncoded = S.encodedSchema(ContainerBlkioStats); +export type ContainerBlkioStatsEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/ContainerCPUStats.ts b/packages/effect-docker/src/gen/v1.53/ContainerCPUStats.ts new file mode 100644 index 0000000..ced7f9b --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/ContainerCPUStats.ts @@ -0,0 +1,26 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +import { ContainerCPUUsage } from './ContainerCPUUsage.ts'; +import { ContainerThrottlingData } from './ContainerThrottlingData.ts'; + +/** CPU related info of the container */ +export const ContainerCPUStats = S.Struct({ + cpu_usage: S.optional(ContainerCPUUsage), + /** + * System Usage. + * + * This field is Linux-specific and omitted for Windows containers. + */ + system_cpu_usage: S.optional(pipe(S.Number, S.int())), + /** + * Number of online CPUs. + * + * This field is Linux-specific and omitted for Windows containers. + */ + online_cpus: S.optional(pipe(S.Number, S.int())), + throttling_data: S.optional(ContainerThrottlingData), +}); +export type ContainerCPUStats = S.Schema.Type; +export const ContainerCPUStatsEncoded = S.encodedSchema(ContainerCPUStats); +export type ContainerCPUStatsEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/ContainerCPUUsage.ts b/packages/effect-docker/src/gen/v1.53/ContainerCPUUsage.ts new file mode 100644 index 0000000..8f6712d --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/ContainerCPUUsage.ts @@ -0,0 +1,32 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +/** All CPU stats aggregated since container inception. */ +export const ContainerCPUUsage = S.Struct({ + /** Total CPU time consumed in nanoseconds (Linux) or 100's of nanoseconds (Windows). */ + total_usage: S.optional(pipe(S.Number, S.int())), + /** + * Total CPU time (in nanoseconds) consumed per core (Linux). + * + * This field is Linux-specific when using cgroups v1. It is omitted when using cgroups v2 and + * Windows containers. + */ + percpu_usage: S.optional(S.Array(pipe(S.Number, S.int()))), + /** + * Time (in nanoseconds) spent by tasks of the cgroup in kernel mode (Linux), or time spent (in + * 100's of nanoseconds) by all container processes in kernel mode (Windows). + * + * Not populated for Windows containers using Hyper-V isolation. + */ + usage_in_kernelmode: S.optional(pipe(S.Number, S.int())), + /** + * Time (in nanoseconds) spent by tasks of the cgroup in user mode (Linux), or time spent (in + * 100's of nanoseconds) by all container processes in kernel mode (Windows). + * + * Not populated for Windows containers using Hyper-V isolation. + */ + usage_in_usermode: S.optional(pipe(S.Number, S.int())), +}); +export type ContainerCPUUsage = S.Schema.Type; +export const ContainerCPUUsageEncoded = S.encodedSchema(ContainerCPUUsage); +export type ContainerCPUUsageEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/ContainerConfig.ts b/packages/effect-docker/src/gen/v1.53/ContainerConfig.ts new file mode 100644 index 0000000..d1ed980 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/ContainerConfig.ts @@ -0,0 +1,94 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +import { HealthConfig } from './HealthConfig.ts'; + +/** Configuration for a container that is portable between hosts. */ +export const ContainerConfig = S.Struct({ + /** The hostname to use for the container, as a valid RFC 1123 hostname. */ + Hostname: S.optional(S.String), + /** The domain name to use for the container. */ + Domainname: S.optional(S.String), + /** + * Commands run as this user inside the container. If omitted, commands run as the user specified + * in the image the container was started from. + * + * Can be either user-name or UID, and optional group-name or GID, separated by a colon + * (`[<:group-name|GID>]`). + */ + User: S.optional(S.String), + /** Whether to attach to `stdin`. */ + AttachStdin: S.optionalWith(S.Boolean, { + default: () => false, + }), + /** Whether to attach to `stdout`. */ + AttachStdout: S.optionalWith(S.Boolean, { + default: () => true, + }), + /** Whether to attach to `stderr`. */ + AttachStderr: S.optionalWith(S.Boolean, { + default: () => true, + }), + /** + * An object mapping ports to an empty object in the form: + * + * `{"/": {}}` + */ + ExposedPorts: S.optional(S.Record({ key: S.String, value: S.Struct({}) })), + /** Attach standard streams to a TTY, including `stdin` if it is not closed. */ + Tty: S.optionalWith(S.Boolean, { + default: () => false, + }), + /** Open `stdin` */ + OpenStdin: S.optionalWith(S.Boolean, { + default: () => false, + }), + /** Close `stdin` after one attached client disconnects */ + StdinOnce: S.optionalWith(S.Boolean, { + default: () => false, + }), + /** + * A list of environment variables to set inside the container in the form `["VAR=value", ...]`. A + * variable without `=` is removed from the environment, rather than to have an empty value. + */ + Env: S.optional(S.Array(S.String)), + /** Command to run specified as a string or an array of strings. */ + Cmd: S.optional(S.Array(S.String)), + Healthcheck: S.optional(HealthConfig), + /** Command is already escaped (Windows only) */ + ArgsEscaped: S.optionalWith(S.Boolean, { + default: () => false, + }), + /** + * The name (or reference) of the image to use when creating the container, or which was used when + * the container was created. + */ + Image: S.optional(S.String), + /** An object mapping mount point paths inside the container to empty objects. */ + Volumes: S.optional(S.Record({ key: S.String, value: S.Struct({}) })), + /** The working directory for commands to run in. */ + WorkingDir: S.optional(S.String), + /** + * The entry point for the container as a string or an array of strings. + * + * If the array consists of exactly one empty string (`[""]`) then the entry point is reset to + * system default (i.e., the entry point used by docker when there is no `ENTRYPOINT` instruction + * in the `Dockerfile`). + */ + Entrypoint: S.optional(S.Array(S.String)), + /** Disable networking for the container. */ + NetworkDisabled: S.optional(S.Boolean), + /** `ONBUILD` metadata that were defined in the image's `Dockerfile`. */ + OnBuild: S.optional(S.Array(S.String)), + /** User-defined key/value metadata. */ + Labels: S.optional(S.Record({ key: S.String, value: S.String })), + /** Signal to stop a container as a string or unsigned integer. */ + StopSignal: S.optional(S.String), + /** Timeout to stop a container in seconds. */ + StopTimeout: S.optional(pipe(S.Number, S.int())), + /** Shell for when `RUN`, `CMD`, and `ENTRYPOINT` uses a shell. */ + Shell: S.optional(S.Array(S.String)), +}); +export type ContainerConfig = S.Schema.Type; +export const ContainerConfigEncoded = S.encodedSchema(ContainerConfig); +export type ContainerConfigEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/ContainerCreateResponse.ts b/packages/effect-docker/src/gen/v1.53/ContainerCreateResponse.ts new file mode 100644 index 0000000..deed4eb --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/ContainerCreateResponse.ts @@ -0,0 +1,13 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +/** OK response to ContainerCreate operation */ +export const ContainerCreateResponse = S.Struct({ + /** The ID of the created container */ + Id: S.String, + /** Warnings encountered when creating the container */ + Warnings: S.Array(S.String), +}); // ContainerCreateResponse +export type ContainerCreateResponse = S.Schema.Type; +export const ContainerCreateResponseEncoded = S.encodedSchema(ContainerCreateResponse); +export type ContainerCreateResponseEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/ContainerInspectResponse.ts b/packages/effect-docker/src/gen/v1.53/ContainerInspectResponse.ts new file mode 100644 index 0000000..710bbb3 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/ContainerInspectResponse.ts @@ -0,0 +1,109 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +import { ContainerState } from './ContainerState.ts'; +import { OCIDescriptor } from './OCIDescriptor.ts'; +import { HostConfig } from './HostConfig.ts'; +import { DriverData } from './DriverData.ts'; +import { Storage } from './Storage.ts'; +import { MountPoint } from './MountPoint.ts'; +import { ContainerConfig } from './ContainerConfig.ts'; +import { NetworkSettings } from './NetworkSettings.ts'; + +export const ContainerInspectResponse = S.Struct({ + /** The ID of this container as a 128-bit (64-character) hexadecimal string (32 bytes). */ + Id: S.optional( + pipe(S.String, S.pattern(new RegExp('^[0-9a-fA-F]{64}$')), S.minLength(64), S.maxLength(64)), + ), + /** + * Date and time at which the container was created, formatted in [RFC + * 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + */ + Created: S.optional(S.String), + /** The path to the command being run */ + Path: S.optional(S.String), + /** The arguments to the command being run */ + Args: S.optional(S.Array(S.String)), + State: S.optional(ContainerState), + /** The ID (digest) of the image that this container was created from. */ + Image: S.optional(S.String), + /** + * Location of the `/etc/resolv.conf` generated for the container on the host. + * + * This file is managed through the docker daemon, and should not be accessed or modified by other + * tools. + */ + ResolvConfPath: S.optional(S.String), + /** + * Location of the `/etc/hostname` generated for the container on the host. + * + * This file is managed through the docker daemon, and should not be accessed or modified by other + * tools. + */ + HostnamePath: S.optional(S.String), + /** + * Location of the `/etc/hosts` generated for the container on the host. + * + * This file is managed through the docker daemon, and should not be accessed or modified by other + * tools. + */ + HostsPath: S.optional(S.String), + /** + * Location of the file used to buffer the container's logs. Depending on the logging-driver used + * for the container, this field may be omitted. + * + * This file is managed through the docker daemon, and should not be accessed or modified by other + * tools. + */ + LogPath: S.optional(S.String), + /** + * The name associated with this container. + * + * For historic reasons, the name may be prefixed with a forward-slash (`/`). + */ + Name: S.optional(S.String), + /** Number of times the container was restarted since it was created, or since daemon was started. */ + RestartCount: S.optional(pipe(S.Number, S.int())), + /** The storage-driver used for the container's filesystem (graph-driver or snapshotter). */ + Driver: S.optional(S.String), + /** + * The platform (operating system) for which the container was created. + * + * This field was introduced for the experimental "LCOW" (Linux Containers On Windows) features, + * which has been removed. In most cases, this field is equal to the host's operating system + * (`linux` or `windows`). + */ + Platform: S.optional(S.String), + ImageManifestDescriptor: S.optional(OCIDescriptor), + /** SELinux mount label set for the container. */ + MountLabel: S.optional(S.String), + /** SELinux process label set for the container. */ + ProcessLabel: S.optional(S.String), + /** The AppArmor profile set for the container. */ + AppArmorProfile: S.optional(S.String), + /** IDs of exec instances that are running in the container. */ + ExecIDs: S.optional(S.Array(S.String)), + HostConfig: S.optional(HostConfig), + GraphDriver: S.optional(DriverData), + Storage: S.optional(Storage), + /** + * The size of files that have been created or changed by this container. + * + * This field is omitted by default, and only set when size is requested in the API request. + */ + SizeRw: S.optional(pipe(S.Number, S.int())), + /** + * The total size of all files in the read-only layers from the image that the container uses. + * These layers can be shared between containers. + * + * This field is omitted by default, and only set when size is requested in the API request. + */ + SizeRootFs: S.optional(pipe(S.Number, S.int())), + /** List of mounts used by the container. */ + Mounts: S.optional(S.Array(MountPoint)), + Config: S.optional(ContainerConfig), + NetworkSettings: S.optional(NetworkSettings), +}); // ContainerInspectResponse +export type ContainerInspectResponse = S.Schema.Type; +export const ContainerInspectResponseEncoded = S.encodedSchema(ContainerInspectResponse); +export type ContainerInspectResponseEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/ContainerMemoryStats.ts b/packages/effect-docker/src/gen/v1.53/ContainerMemoryStats.ts new file mode 100644 index 0000000..70c0067 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/ContainerMemoryStats.ts @@ -0,0 +1,62 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +/** + * Aggregates all memory stats since container inception on Linux. Windows returns stats for commit + * and private working set only. + */ +export const ContainerMemoryStats = S.Struct({ + /** + * Current `res_counter` usage for memory. + * + * This field is Linux-specific and omitted for Windows containers. + */ + usage: S.optional(pipe(S.Number, S.int())), + /** + * Maximum usage ever recorded. + * + * This field is Linux-specific and only supported on cgroups v1. It is omitted when using cgroups + * v2 and for Windows containers. + */ + max_usage: S.optional(pipe(S.Number, S.int())), + /** + * All the stats exported via memory.stat. + * + * The fields in this object differ between cgroups v1 and v2. On cgroups v1, fields such as + * `cache`, `rss`, `mapped_file` are available. On cgroups v2, fields such as `file`, `anon`, + * `inactive_file` are available. + * + * This field is Linux-specific and omitted for Windows containers. + */ + stats: S.optional(S.Record({ key: S.String, value: pipe(S.Number, S.int()) })), + /** + * Number of times memory usage hits limits. + * + * This field is Linux-specific and only supported on cgroups v1. It is omitted when using cgroups + * v2 and for Windows containers. + */ + failcnt: S.optional(pipe(S.Number, S.int())), + /** This field is Linux-specific and omitted for Windows containers. */ + limit: S.optional(pipe(S.Number, S.int())), + /** + * Committed bytes. + * + * This field is Windows-specific and omitted for Linux containers. + */ + commitbytes: S.optional(pipe(S.Number, S.int())), + /** + * Peak committed bytes. + * + * This field is Windows-specific and omitted for Linux containers. + */ + commitpeakbytes: S.optional(pipe(S.Number, S.int())), + /** + * Private working set. + * + * This field is Windows-specific and omitted for Linux containers. + */ + privateworkingset: S.optional(pipe(S.Number, S.int())), +}); +export type ContainerMemoryStats = S.Schema.Type; +export const ContainerMemoryStatsEncoded = S.encodedSchema(ContainerMemoryStats); +export type ContainerMemoryStatsEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/ContainerNetworkStats.ts b/packages/effect-docker/src/gen/v1.53/ContainerNetworkStats.ts new file mode 100644 index 0000000..2f2c068 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/ContainerNetworkStats.ts @@ -0,0 +1,45 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +/** Aggregates the network stats of one container */ +export const ContainerNetworkStats = S.Struct({ + /** Bytes received. Windows and Linux. */ + rx_bytes: S.optional(pipe(S.Number, S.int())), + /** Packets received. Windows and Linux. */ + rx_packets: S.optional(pipe(S.Number, S.int())), + /** + * Received errors. Not used on Windows. + * + * This field is Linux-specific and always zero for Windows containers. + */ + rx_errors: S.optional(pipe(S.Number, S.int())), + /** Incoming packets dropped. Windows and Linux. */ + rx_dropped: S.optional(pipe(S.Number, S.int())), + /** Bytes sent. Windows and Linux. */ + tx_bytes: S.optional(pipe(S.Number, S.int())), + /** Packets sent. Windows and Linux. */ + tx_packets: S.optional(pipe(S.Number, S.int())), + /** + * Sent errors. Not used on Windows. + * + * This field is Linux-specific and always zero for Windows containers. + */ + tx_errors: S.optional(pipe(S.Number, S.int())), + /** Outgoing packets dropped. Windows and Linux. */ + tx_dropped: S.optional(pipe(S.Number, S.int())), + /** + * Endpoint ID. Not used on Linux. + * + * This field is Windows-specific and omitted for Linux containers. + */ + endpoint_id: S.optional(S.String), + /** + * Instance ID. Not used on Linux. + * + * This field is Windows-specific and omitted for Linux containers. + */ + instance_id: S.optional(S.String), +}); +export type ContainerNetworkStats = S.Schema.Type; +export const ContainerNetworkStatsEncoded = S.encodedSchema(ContainerNetworkStats); +export type ContainerNetworkStatsEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/ContainerPidsStats.ts b/packages/effect-docker/src/gen/v1.53/ContainerPidsStats.ts new file mode 100644 index 0000000..8ef217c --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/ContainerPidsStats.ts @@ -0,0 +1,20 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +/** + * PidsStats contains Linux-specific stats of a container's process-IDs (PIDs). + * + * This type is Linux-specific and omitted for Windows containers. + */ +export const ContainerPidsStats = S.Struct({ + /** Current is the number of PIDs in the cgroup. */ + current: S.optional(pipe(S.Number, S.int())), + /** + * Limit is the hard limit on the number of pids in the cgroup. A "Limit" of 0 means that there is + * no limit. + */ + limit: S.optional(pipe(S.Number, S.int())), +}); +export type ContainerPidsStats = S.Schema.Type; +export const ContainerPidsStatsEncoded = S.encodedSchema(ContainerPidsStats); +export type ContainerPidsStatsEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/ContainerState.ts b/packages/effect-docker/src/gen/v1.53/ContainerState.ts new file mode 100644 index 0000000..35ef9ca --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/ContainerState.ts @@ -0,0 +1,54 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +import { Health } from './Health.ts'; + +/** + * ContainerState stores container's running state. It's part of ContainerJSONBase and will be + * returned by the "inspect" command. + */ +export const ContainerState = S.Struct({ + /** + * String representation of the container state. Can be one of "created", "running", "paused", + * "restarting", "removing", "exited", or "dead". + */ + Status: S.optional( + S.Literal('created', 'running', 'paused', 'restarting', 'removing', 'exited', 'dead'), + ), + /** + * Whether this container is running. + * + * Note that a running container can be _paused_. The `Running` and `Paused` booleans are not + * mutually exclusive: + * + * When pausing a container (on Linux), the freezer cgroup is used to suspend all processes in the + * container. Freezing the process requires the process to be running. As a result, paused + * containers are both `Running` _and_ `Paused`. + * + * Use the `Status` field instead to determine if a container's state is "running". + */ + Running: S.optional(S.Boolean), + /** Whether this container is paused. */ + Paused: S.optional(S.Boolean), + /** Whether this container is restarting. */ + Restarting: S.optional(S.Boolean), + /** + * Whether a process within this container has been killed because it ran out of memory since the + * container was last started. + */ + OOMKilled: S.optional(S.Boolean), + Dead: S.optional(S.Boolean), + /** The process ID of this container */ + Pid: S.optional(pipe(S.Number, S.int())), + /** The last exit code of this container */ + ExitCode: S.optional(pipe(S.Number, S.int())), + Error: S.optional(S.String), + /** The time when this container was last started. */ + StartedAt: S.optional(S.String), + /** The time when this container last exited. */ + FinishedAt: S.optional(S.String), + Health: S.optional(Health), +}); +export type ContainerState = S.Schema.Type; +export const ContainerStateEncoded = S.encodedSchema(ContainerState); +export type ContainerStateEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/ContainerStatsResponse.ts b/packages/effect-docker/src/gen/v1.53/ContainerStatsResponse.ts new file mode 100644 index 0000000..636a23c --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/ContainerStatsResponse.ts @@ -0,0 +1,55 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +import { ContainerCPUStats } from './ContainerCPUStats.ts'; +import { ContainerMemoryStats } from './ContainerMemoryStats.ts'; +import { ContainerPidsStats } from './ContainerPidsStats.ts'; +import { ContainerBlkioStats } from './ContainerBlkioStats.ts'; +import { ContainerStorageStats } from './ContainerStorageStats.ts'; + +/** Statistics sample for a container. */ +export const ContainerStatsResponse = S.Struct({ + /** ID of the container for which the stats were collected. */ + id: S.optional(S.String), + /** Name of the container for which the stats were collected. */ + name: S.optional(S.String), + /** + * OSType is the OS of the container ("linux" or "windows") to allow platform-specific handling of + * stats. + */ + os_type: S.optional(S.String), + /** + * Date and time at which this sample was collected. The value is formatted as [RFC + * 3339](https://www.ietf.org/rfc/rfc3339.txt) with nano-seconds. + */ + read: S.optional(S.Date), + cpu_stats: S.optional(ContainerCPUStats), + memory_stats: S.optional(ContainerMemoryStats), + /** + * Network statistics for the container per interface. + * + * This field is omitted if the container has no networking enabled. + */ + networks: S.optional(S.Struct({})), + pids_stats: S.optional(ContainerPidsStats), + blkio_stats: S.optional(ContainerBlkioStats), + /** + * The number of processors on the system. + * + * This field is Windows-specific and always zero for Linux containers. + */ + num_procs: S.optional(pipe(S.Number, S.int())), + storage_stats: S.optional(ContainerStorageStats), + /** + * Date and time at which this first sample was collected. This field is not propagated if the + * "one-shot" option is set. If the "one-shot" option is set, this field may be omitted, empty, or + * set to a default date (`0001-01-01T00:00:00Z`). + * + * The value is formatted as [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) with nano-seconds. + */ + preread: S.optional(S.Date), + precpu_stats: S.optional(ContainerCPUStats), +}); // ContainerStatsResponse +export type ContainerStatsResponse = S.Schema.Type; +export const ContainerStatsResponseEncoded = S.encodedSchema(ContainerStatsResponse); +export type ContainerStatsResponseEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/ContainerStatus.ts b/packages/effect-docker/src/gen/v1.53/ContainerStatus.ts new file mode 100644 index 0000000..6b2d2a7 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/ContainerStatus.ts @@ -0,0 +1,12 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +/** Represents the status of a container. */ +export const ContainerStatus = S.Struct({ + ContainerID: S.optional(S.String), + PID: S.optional(pipe(S.Number, S.int())), + ExitCode: S.optional(pipe(S.Number, S.int())), +}); +export type ContainerStatus = S.Schema.Type; +export const ContainerStatusEncoded = S.encodedSchema(ContainerStatus); +export type ContainerStatusEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/ContainerStorageStats.ts b/packages/effect-docker/src/gen/v1.53/ContainerStorageStats.ts new file mode 100644 index 0000000..2831820 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/ContainerStorageStats.ts @@ -0,0 +1,17 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +/** + * StorageStats is the disk I/O stats for read/write on Windows. + * + * This type is Windows-specific and omitted for Linux containers. + */ +export const ContainerStorageStats = S.Struct({ + read_count_normalized: S.optional(pipe(S.Number, S.int())), + read_size_bytes: S.optional(pipe(S.Number, S.int())), + write_count_normalized: S.optional(pipe(S.Number, S.int())), + write_size_bytes: S.optional(pipe(S.Number, S.int())), +}); +export type ContainerStorageStats = S.Schema.Type; +export const ContainerStorageStatsEncoded = S.encodedSchema(ContainerStorageStats); +export type ContainerStorageStatsEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/ContainerSummary.ts b/packages/effect-docker/src/gen/v1.53/ContainerSummary.ts new file mode 100644 index 0000000..0308df3 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/ContainerSummary.ts @@ -0,0 +1,115 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +import { OCIDescriptor } from './OCIDescriptor.ts'; +import { PortSummary } from './PortSummary.ts'; +import { EndpointSettings } from './EndpointSettings.ts'; +import { MountPoint } from './MountPoint.ts'; + +export const ContainerSummary = S.Struct({ + /** The ID of this container as a 128-bit (64-character) hexadecimal string (32 bytes). */ + Id: S.optional( + pipe(S.String, S.pattern(new RegExp('^[0-9a-fA-F]{64}$')), S.minLength(64), S.maxLength(64)), + ), + /** + * The names associated with this container. Most containers have a single name, but when using + * legacy "links", the container can have multiple names. + * + * For historic reasons, names are prefixed with a forward-slash (`/`). + */ + Names: S.optional(S.Array(S.String)), + /** + * The name or ID of the image used to create the container. + * + * This field shows the image reference as was specified when creating the container, which can be + * in its canonical form (e.g., `docker.io/library/ubuntu:latest` or + * `docker.io/library/ubuntu@sha256:72297848456d5d37d1262630108ab308d3e9ec7ed1c3286a32fe09856619a782`), + * short form (e.g., `ubuntu:latest`)), or the ID(-prefix) of the image (e.g., `72297848456d`). + * + * The content of this field can be updated at runtime if the image used to create the container + * is untagged, in which case the field is updated to contain the the image ID (digest) it was + * resolved to in its canonical, non-truncated form (e.g., + * `sha256:72297848456d5d37d1262630108ab308d3e9ec7ed1c3286a32fe09856619a782`). + */ + Image: S.optional(S.String), + /** The ID (digest) of the image that this container was created from. */ + ImageID: S.optional(S.String), + ImageManifestDescriptor: S.optional(OCIDescriptor), + /** Command to run when starting the container */ + Command: S.optional(S.String), + /** + * Date and time at which the container was created as a Unix timestamp (number of seconds since + * EPOCH). + */ + Created: S.optional(pipe(S.Number, S.int())), + /** Port-mappings for the container. */ + Ports: S.optional(S.Array(PortSummary)), + /** + * The size of files that have been created or changed by this container. + * + * This field is omitted by default, and only set when size is requested in the API request. + */ + SizeRw: S.optional(pipe(S.Number, S.int())), + /** + * The total size of all files in the read-only layers from the image that the container uses. + * These layers can be shared between containers. + * + * This field is omitted by default, and only set when size is requested in the API request. + */ + SizeRootFs: S.optional(pipe(S.Number, S.int())), + /** User-defined key/value metadata. */ + Labels: S.optional(S.Record({ key: S.String, value: S.String })), + /** The state of this container. */ + State: S.optional( + S.Literal('created', 'running', 'paused', 'restarting', 'exited', 'removing', 'dead'), + ), + /** Additional human-readable status of this container (e.g. `Exit 0`) */ + Status: S.optional(S.String), + /** + * Summary of host-specific runtime information of the container. This is a reduced set of + * information in the container's "HostConfig" as available in the container "inspect" response. + */ + HostConfig: S.optional( + S.Struct({ + /** + * Networking mode (`host`, `none`, `container:`) or name of the primary network the + * container is using. + * + * This field is primarily for backward compatibility. The container + * can be connected to multiple networks for which information can be + * found in the `NetworkSettings.Networks` field, which enumerates + * settings per network. + */ + NetworkMode: S.optional(S.String), + /** Arbitrary key-value metadata attached to the container. */ + Annotations: S.optional(S.Record({ key: S.String, value: S.String })), + }), + ), + /** Summary of the container's network settings */ + NetworkSettings: S.optional( + S.Struct({ + /** Summary of network-settings for each network the container is attached to. */ + Networks: S.optional(S.Record({ key: S.String, value: EndpointSettings })), + }), + ), + /** List of mounts used by the container. */ + Mounts: S.optional(S.Array(MountPoint)), + /** + * Summary of health status + * + * Added in v1.52, before that version all container summary not include Health. After this + * attribute introduced, it includes containers with no health checks configured, or containers + * that are not running with none + */ + Health: S.optional( + S.Struct({ + /** The health status of the container */ + Status: S.optional(S.Literal('none', 'starting', 'healthy', 'unhealthy')), + /** FailingStreak is the number of consecutive failures */ + FailingStreak: S.optional(pipe(S.Number, S.int())), + }), + ), +}); +export type ContainerSummary = S.Schema.Type; +export const ContainerSummaryEncoded = S.encodedSchema(ContainerSummary); +export type ContainerSummaryEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/ContainerThrottlingData.ts b/packages/effect-docker/src/gen/v1.53/ContainerThrottlingData.ts new file mode 100644 index 0000000..83a2983 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/ContainerThrottlingData.ts @@ -0,0 +1,19 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +/** + * CPU throttling stats of the container. + * + * This type is Linux-specific and omitted for Windows containers. + */ +export const ContainerThrottlingData = S.Struct({ + /** Number of periods with throttling active. */ + periods: S.optional(pipe(S.Number, S.int())), + /** Number of periods when the container hit its throttling limit. */ + throttled_periods: S.optional(pipe(S.Number, S.int())), + /** Aggregated time (in nanoseconds) the container was throttled for. */ + throttled_time: S.optional(pipe(S.Number, S.int())), +}); +export type ContainerThrottlingData = S.Schema.Type; +export const ContainerThrottlingDataEncoded = S.encodedSchema(ContainerThrottlingData); +export type ContainerThrottlingDataEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/ContainerTopResponse.ts b/packages/effect-docker/src/gen/v1.53/ContainerTopResponse.ts new file mode 100644 index 0000000..ba5fe91 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/ContainerTopResponse.ts @@ -0,0 +1,16 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +/** Container "top" response. */ +export const ContainerTopResponse = S.Struct({ + /** The ps column titles */ + Titles: S.optional(S.Array(S.String)), + /** + * Each process running in the container, where each process is an array of values corresponding + * to the titles. + */ + Processes: S.optional(S.Array(S.Array(S.String))), +}); // ContainerTopResponse +export type ContainerTopResponse = S.Schema.Type; +export const ContainerTopResponseEncoded = S.encodedSchema(ContainerTopResponse); +export type ContainerTopResponseEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/ContainerUpdateResponse.ts b/packages/effect-docker/src/gen/v1.53/ContainerUpdateResponse.ts new file mode 100644 index 0000000..19fe24f --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/ContainerUpdateResponse.ts @@ -0,0 +1,11 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +/** Response for a successful container-update. */ +export const ContainerUpdateResponse = S.Struct({ + /** Warnings encountered when updating the container. */ + Warnings: S.optional(S.Array(S.String)), +}); // ContainerUpdateResponse +export type ContainerUpdateResponse = S.Schema.Type; +export const ContainerUpdateResponseEncoded = S.encodedSchema(ContainerUpdateResponse); +export type ContainerUpdateResponseEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/ContainerWaitExitError.ts b/packages/effect-docker/src/gen/v1.53/ContainerWaitExitError.ts new file mode 100644 index 0000000..4d7bbbe --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/ContainerWaitExitError.ts @@ -0,0 +1,11 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +/** Container waiting error, if any */ +export const ContainerWaitExitError = S.Struct({ + /** Details of an error */ + Message: S.optional(S.String), +}); +export type ContainerWaitExitError = S.Schema.Type; +export const ContainerWaitExitErrorEncoded = S.encodedSchema(ContainerWaitExitError); +export type ContainerWaitExitErrorEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/ContainerWaitResponse.ts b/packages/effect-docker/src/gen/v1.53/ContainerWaitResponse.ts new file mode 100644 index 0000000..6fd3db6 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/ContainerWaitResponse.ts @@ -0,0 +1,14 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +import { ContainerWaitExitError } from './ContainerWaitExitError.ts'; + +/** OK response to ContainerWait operation */ +export const ContainerWaitResponse = S.Struct({ + /** Exit code of the container */ + StatusCode: pipe(S.Number, S.int()), + Error: S.optional(ContainerWaitExitError), +}); // ContainerWaitResponse +export type ContainerWaitResponse = S.Schema.Type; +export const ContainerWaitResponseEncoded = S.encodedSchema(ContainerWaitResponse); +export type ContainerWaitResponseEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/ContainerdInfo.ts b/packages/effect-docker/src/gen/v1.53/ContainerdInfo.ts new file mode 100644 index 0000000..d94fa51 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/ContainerdInfo.ts @@ -0,0 +1,50 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +/** + * Information for connecting to the containerd instance that is used by the daemon. This is + * included for debugging purposes only. + */ +export const ContainerdInfo = S.Struct({ + /** The address of the containerd socket. */ + Address: S.optional(S.String), + /** + * The namespaces that the daemon uses for running containers and plugins in containerd. These + * namespaces can be configured in the daemon configuration, and are considered to be used + * exclusively by the daemon, Tampering with the containerd instance may cause unexpected + * behavior. + * + * As these namespaces are considered to be exclusively accessed by the daemon, it is not + * recommended to change these values, or to change them to a value that is used by other systems, + * such as cri-containerd. + */ + Namespaces: S.optional( + S.Struct({ + /** + * The default containerd namespace used for containers managed by the daemon. + * + * The default namespace for containers is "moby", but will be + * suffixed with the `.` of the remapped `root` if + * user-namespaces are enabled and the containerd image-store + * is used. + */ + Containers: S.optionalWith(S.String, { + default: () => 'moby', + }), + /** + * The default containerd namespace used for plugins managed by the daemon. + * + * The default namespace for plugins is "plugins.moby", but will be + * suffixed with the `.` of the remapped `root` if + * user-namespaces are enabled and the containerd image-store + * is used. + */ + Plugins: S.optionalWith(S.String, { + default: () => 'plugins.moby', + }), + }), + ), +}); +export type ContainerdInfo = S.Schema.Type; +export const ContainerdInfoEncoded = S.encodedSchema(ContainerdInfo); +export type ContainerdInfoEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/ContainersDiskUsage.ts b/packages/effect-docker/src/gen/v1.53/ContainersDiskUsage.ts new file mode 100644 index 0000000..d3856f1 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/ContainersDiskUsage.ts @@ -0,0 +1,19 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +/** Represents system data usage information for container resources. */ +export const ContainersDiskUsage = S.Struct({ + /** Count of active containers. */ + ActiveCount: S.optional(pipe(S.Number, S.int())), + /** Count of all containers. */ + TotalCount: S.optional(pipe(S.Number, S.int())), + /** Disk space that can be reclaimed by removing inactive containers. */ + Reclaimable: S.optional(pipe(S.Number, S.int())), + /** Disk space in use by containers. */ + TotalSize: S.optional(pipe(S.Number, S.int())), + /** List of container summaries. */ + Items: S.optional(S.Array(S.Struct({}))), +}); +export type ContainersDiskUsage = S.Schema.Type; +export const ContainersDiskUsageEncoded = S.encodedSchema(ContainersDiskUsage); +export type ContainersDiskUsageEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/CreateImageInfo.ts b/packages/effect-docker/src/gen/v1.53/CreateImageInfo.ts new file mode 100644 index 0000000..df121b5 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/CreateImageInfo.ts @@ -0,0 +1,15 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +import { ErrorDetail } from './ErrorDetail.ts'; +import { ProgressDetail } from './ProgressDetail.ts'; + +export const CreateImageInfo = S.Struct({ + id: S.optional(S.String), + errorDetail: S.optional(ErrorDetail), + status: S.optional(S.String), + progressDetail: S.optional(ProgressDetail), +}); +export type CreateImageInfo = S.Schema.Type; +export const CreateImageInfoEncoded = S.encodedSchema(CreateImageInfo); +export type CreateImageInfoEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/DeviceInfo.ts b/packages/effect-docker/src/gen/v1.53/DeviceInfo.ts new file mode 100644 index 0000000..9c2adc1 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/DeviceInfo.ts @@ -0,0 +1,16 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +/** DeviceInfo represents a device that can be used by a container. */ +export const DeviceInfo = S.Struct({ + /** The origin device driver. */ + Source: S.optional(S.String), + /** + * The unique identifier for the device within its source driver. For CDI devices, this would be + * an FQDN like "vendor.com/gpu=0". + */ + ID: S.optional(S.String), +}); +export type DeviceInfo = S.Schema.Type; +export const DeviceInfoEncoded = S.encodedSchema(DeviceInfo); +export type DeviceInfoEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/DeviceMapping.ts b/packages/effect-docker/src/gen/v1.53/DeviceMapping.ts new file mode 100644 index 0000000..97d2858 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/DeviceMapping.ts @@ -0,0 +1,12 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +/** A device mapping between the host and container */ +export const DeviceMapping = S.Struct({ + PathOnHost: S.optional(S.String), + PathInContainer: S.optional(S.String), + CgroupPermissions: S.optional(S.String), +}); +export type DeviceMapping = S.Schema.Type; +export const DeviceMappingEncoded = S.encodedSchema(DeviceMapping); +export type DeviceMappingEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/DeviceRequest.ts b/packages/effect-docker/src/gen/v1.53/DeviceRequest.ts new file mode 100644 index 0000000..305c852 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/DeviceRequest.ts @@ -0,0 +1,32 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +/** A request for devices to be sent to device drivers */ +export const DeviceRequest = S.Struct({ + /** + * The name of the device driver to use for this request. + * + * Note that if this is specified the capabilities are ignored when selecting a device driver. + */ + Driver: S.optional(S.String), + Count: S.optional(pipe(S.Number, S.int())), + DeviceIDs: S.optional(S.Array(S.String)), + /** + * A list of capabilities; an OR list of AND lists of capabilities. + * + * Note that if a driver is specified the capabilities have no effect on selecting a driver as the + * driver name is used directly. + * + * Note that if no driver is specified the capabilities are used to select a driver with the + * required capabilities. + */ + Capabilities: S.optional(S.Array(S.Array(S.String))), + /** + * Driver-specific options, specified as a key/value pairs. These options are passed directly to + * the driver. + */ + Options: S.optional(S.Record({ key: S.String, value: S.String })), +}); +export type DeviceRequest = S.Schema.Type; +export const DeviceRequestEncoded = S.encodedSchema(DeviceRequest); +export type DeviceRequestEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/DistributionInspect.ts b/packages/effect-docker/src/gen/v1.53/DistributionInspect.ts new file mode 100644 index 0000000..9a0c876 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/DistributionInspect.ts @@ -0,0 +1,15 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +import { OCIDescriptor } from './OCIDescriptor.ts'; +import { OCIPlatform } from './OCIPlatform.ts'; + +/** Describes the result obtained from contacting the registry to retrieve image metadata. */ +export const DistributionInspect = S.Struct({ + Descriptor: OCIDescriptor, + /** An array containing all platforms supported by the image. */ + Platforms: S.Array(OCIPlatform), +}); // DistributionInspectResponse +export type DistributionInspect = S.Schema.Type; +export const DistributionInspectEncoded = S.encodedSchema(DistributionInspect); +export type DistributionInspectEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/Driver.ts b/packages/effect-docker/src/gen/v1.53/Driver.ts new file mode 100644 index 0000000..d818315 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/Driver.ts @@ -0,0 +1,13 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +/** Driver represents a driver (network, logging, secrets). */ +export const Driver = S.Struct({ + /** Name of the driver. */ + Name: S.String, + /** Key/value map of driver-specific options. */ + Options: S.optional(S.Record({ key: S.String, value: S.String })), +}); +export type Driver = S.Schema.Type; +export const DriverEncoded = S.encodedSchema(Driver); +export type DriverEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/DriverData.ts b/packages/effect-docker/src/gen/v1.53/DriverData.ts new file mode 100644 index 0000000..2ac4c6a --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/DriverData.ts @@ -0,0 +1,18 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +/** Information about the storage driver used to store the container's and image's filesystem. */ +export const DriverData = S.Struct({ + /** Name of the storage driver. */ + Name: S.String, + /** + * Low-level storage metadata, provided as key/value pairs. + * + * This information is driver-specific, and depends on the storage-driver in use, and should be + * used for informational purposes only. + */ + Data: S.Record({ key: S.String, value: S.String }), +}); +export type DriverData = S.Schema.Type; +export const DriverDataEncoded = S.encodedSchema(DriverData); +export type DriverDataEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/EndpointIPAMConfig.ts b/packages/effect-docker/src/gen/v1.53/EndpointIPAMConfig.ts new file mode 100644 index 0000000..34ffa39 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/EndpointIPAMConfig.ts @@ -0,0 +1,12 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +/** EndpointIPAMConfig represents an endpoint's IPAM configuration. */ +export const EndpointIPAMConfig = S.Struct({ + IPv4Address: S.optional(S.String), + IPv6Address: S.optional(S.String), + LinkLocalIPs: S.optional(S.Array(S.String)), +}); +export type EndpointIPAMConfig = S.Schema.Type; +export const EndpointIPAMConfigEncoded = S.encodedSchema(EndpointIPAMConfig); +export type EndpointIPAMConfigEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/EndpointPortConfig.ts b/packages/effect-docker/src/gen/v1.53/EndpointPortConfig.ts new file mode 100644 index 0000000..265bed5 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/EndpointPortConfig.ts @@ -0,0 +1,25 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +export const EndpointPortConfig = S.Struct({ + Name: S.optional(S.String), + Protocol: S.optional(S.Literal('tcp', 'udp', 'sctp')), + /** The port inside the container. */ + TargetPort: S.optional(pipe(S.Number, S.int())), + /** The port on the swarm hosts. */ + PublishedPort: S.optional(pipe(S.Number, S.int())), + /** + * The mode in which port is published.


+ * + * - "ingress" makes the target port accessible on every node, regardless of whether there is a task + * for the service running on that node or not. + * - "host" bypasses the routing mesh and publish the port directly on the swarm node where that + * service is running. + */ + PublishMode: S.optionalWith(S.Literal('ingress', 'host'), { + default: () => 'ingress', + }), +}); +export type EndpointPortConfig = S.Schema.Type; +export const EndpointPortConfigEncoded = S.encodedSchema(EndpointPortConfig); +export type EndpointPortConfigEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/EndpointResource.ts b/packages/effect-docker/src/gen/v1.53/EndpointResource.ts new file mode 100644 index 0000000..7fc1c3c --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/EndpointResource.ts @@ -0,0 +1,14 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +/** Contains network resources allocated and used for a container in a network. */ +export const EndpointResource = S.Struct({ + Name: S.optional(S.String), + EndpointID: S.optional(S.String), + MacAddress: S.optional(S.String), + IPv4Address: S.optional(S.String), + IPv6Address: S.optional(S.String), +}); +export type EndpointResource = S.Schema.Type; +export const EndpointResourceEncoded = S.encodedSchema(EndpointResource); +export type EndpointResourceEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/EndpointSettings.ts b/packages/effect-docker/src/gen/v1.53/EndpointSettings.ts new file mode 100644 index 0000000..522cab4 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/EndpointSettings.ts @@ -0,0 +1,54 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +import { EndpointIPAMConfig } from './EndpointIPAMConfig.ts'; + +/** Configuration for a network endpoint. */ +export const EndpointSettings = S.Struct({ + IPAMConfig: S.optional(EndpointIPAMConfig), + Links: S.optional(S.Array(S.String)), + /** MAC address for the endpoint on this network. The network driver might ignore this parameter. */ + MacAddress: S.optional(S.String), + Aliases: S.optional(S.Array(S.String)), + /** + * DriverOpts is a mapping of driver options and values. These options are passed directly to the + * driver and are driver specific. + */ + DriverOpts: S.optional(S.Record({ key: S.String, value: S.String })), + /** + * This property determines which endpoint will provide the default gateway for a container. The + * endpoint with the highest priority will be used. If multiple endpoints have the same priority, + * endpoints are lexicographically sorted based on their network name, and the one that sorts + * first is picked. + */ + GwPriority: S.optional(pipe(S.Number, S.int())), + /** Unique ID of the network. */ + NetworkID: S.optional(S.String), + /** Unique ID for the service endpoint in a Sandbox. */ + EndpointID: S.optional(S.String), + /** Gateway address for this network. */ + Gateway: S.optional(S.String), + /** IPv4 address. */ + IPAddress: S.optional(S.String), + /** Mask length of the IPv4 address. */ + IPPrefixLen: S.optional(pipe(S.Number, S.int())), + /** IPv6 gateway address. */ + IPv6Gateway: S.optional(S.String), + /** Global IPv6 address. */ + GlobalIPv6Address: S.optional(S.String), + /** Mask length of the global IPv6 address. */ + GlobalIPv6PrefixLen: S.optional(pipe(S.Number, S.int())), + /** + * List of all DNS names an endpoint has on a specific network. This list is based on the + * container name, network aliases, container short ID, and hostname. + * + * These DNS names are non-fully qualified but can contain several dots. You can get fully + * qualified DNS names by appending `.`. For instance, if container name is `my.ctr` + * and the network is named `testnet`, `DNSNames` will contain `my.ctr` and the FQDN will be + * `my.ctr.testnet`. + */ + DNSNames: S.optional(S.Array(S.String)), +}); +export type EndpointSettings = S.Schema.Type; +export const EndpointSettingsEncoded = S.encodedSchema(EndpointSettings); +export type EndpointSettingsEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/EndpointSpec.ts b/packages/effect-docker/src/gen/v1.53/EndpointSpec.ts new file mode 100644 index 0000000..023e34a --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/EndpointSpec.ts @@ -0,0 +1,20 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +import { EndpointPortConfig } from './EndpointPortConfig.ts'; + +/** Properties that can be configured to access and load balance a service. */ +export const EndpointSpec = S.Struct({ + /** The mode of resolution to use for internal load balancing between tasks. */ + Mode: S.optionalWith(S.Literal('vip', 'dnsrr'), { + default: () => 'vip', + }), + /** + * List of exposed ports that this service is accessible on from the outside. Ports can only be + * provided if `vip` resolution mode is used. + */ + Ports: S.optional(S.Array(EndpointPortConfig)), +}); +export type EndpointSpec = S.Schema.Type; +export const EndpointSpecEncoded = S.encodedSchema(EndpointSpec); +export type EndpointSpecEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/EngineDescription.ts b/packages/effect-docker/src/gen/v1.53/EngineDescription.ts new file mode 100644 index 0000000..734460e --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/EngineDescription.ts @@ -0,0 +1,19 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +/** EngineDescription provides information about an engine. */ +export const EngineDescription = S.Struct({ + EngineVersion: S.optional(S.String), + Labels: S.optional(S.Record({ key: S.String, value: S.String })), + Plugins: S.optional( + S.Array( + S.Struct({ + Type: S.optional(S.String), + Name: S.optional(S.String), + }), + ), + ), +}); +export type EngineDescription = S.Schema.Type; +export const EngineDescriptionEncoded = S.encodedSchema(EngineDescription); +export type EngineDescriptionEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/ErrorDetail.ts b/packages/effect-docker/src/gen/v1.53/ErrorDetail.ts new file mode 100644 index 0000000..605c61a --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/ErrorDetail.ts @@ -0,0 +1,10 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +export const ErrorDetail = S.Struct({ + code: S.optional(pipe(S.Number, S.int())), + message: S.optional(S.String), +}); +export type ErrorDetail = S.Schema.Type; +export const ErrorDetailEncoded = S.encodedSchema(ErrorDetail); +export type ErrorDetailEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/ErrorResponse.ts b/packages/effect-docker/src/gen/v1.53/ErrorResponse.ts new file mode 100644 index 0000000..f12555f --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/ErrorResponse.ts @@ -0,0 +1,11 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +/** Represents an error. */ +export const ErrorResponse = S.Struct({ + /** The error message. */ + message: S.String, +}); +export type ErrorResponse = S.Schema.Type; +export const ErrorResponseEncoded = S.encodedSchema(ErrorResponse); +export type ErrorResponseEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/EventActor.ts b/packages/effect-docker/src/gen/v1.53/EventActor.ts new file mode 100644 index 0000000..cec89db --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/EventActor.ts @@ -0,0 +1,13 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +/** Actor describes something that generates events, like a container, network, or a volume. */ +export const EventActor = S.Struct({ + /** The ID of the object emitting the event */ + ID: S.optional(S.String), + /** Various key/value attributes of the object, depending on its type. */ + Attributes: S.optional(S.Record({ key: S.String, value: S.String })), +}); +export type EventActor = S.Schema.Type; +export const EventActorEncoded = S.encodedSchema(EventActor); +export type EventActorEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/EventMessage.ts b/packages/effect-docker/src/gen/v1.53/EventMessage.ts new file mode 100644 index 0000000..b4e3ee8 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/EventMessage.ts @@ -0,0 +1,36 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +import { EventActor } from './EventActor.ts'; + +/** EventMessage represents the information an event contains. */ +export const EventMessage = S.Struct({ + /** The type of object emitting the event */ + Type: S.optional( + S.Literal( + 'builder', + 'config', + 'container', + 'daemon', + 'image', + 'network', + 'node', + 'plugin', + 'secret', + 'service', + 'volume', + ), + ), + /** The type of event */ + Action: S.optional(S.String), + Actor: S.optional(EventActor), + /** Scope of the event. Engine events are `local` scope. Cluster (Swarm) events are `swarm` scope. */ + scope: S.optional(S.Literal('local', 'swarm')), + /** Timestamp of event */ + time: S.optional(pipe(S.Number, S.int())), + /** Timestamp of event, with nanosecond accuracy */ + timeNano: S.optional(pipe(S.Number, S.int())), +}); // SystemEventsResponse +export type EventMessage = S.Schema.Type; +export const EventMessageEncoded = S.encodedSchema(EventMessage); +export type EventMessageEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/FilesystemChange.ts b/packages/effect-docker/src/gen/v1.53/FilesystemChange.ts new file mode 100644 index 0000000..8e6ca01 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/FilesystemChange.ts @@ -0,0 +1,14 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +import { ChangeType } from './ChangeType.ts'; + +/** Change in the container's filesystem. */ +export const FilesystemChange = S.Struct({ + /** Path to file or directory that has changed. */ + Path: S.String, + Kind: ChangeType, +}); +export type FilesystemChange = S.Schema.Type; +export const FilesystemChangeEncoded = S.encodedSchema(FilesystemChange); +export type FilesystemChangeEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/FirewallInfo.ts b/packages/effect-docker/src/gen/v1.53/FirewallInfo.ts new file mode 100644 index 0000000..5844461 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/FirewallInfo.ts @@ -0,0 +1,22 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +/** + * Information about the daemon's firewalling configuration. + * + * This field is currently only used on Linux, and omitted on other platforms. + */ +export const FirewallInfo = S.Struct({ + /** The name of the firewall backend driver. */ + Driver: S.optional(S.String), + /** + * Information about the firewall backend, provided as "label" / "value" pairs.


+ * + * > **Note**: The information returned in this field, including the formatting of values and + * > labels, should not be considered stable, and may change without notice. + */ + Info: S.optional(S.Array(S.Array(S.String))), +}); +export type FirewallInfo = S.Schema.Type; +export const FirewallInfoEncoded = S.encodedSchema(FirewallInfo); +export type FirewallInfoEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/GenericResources.ts b/packages/effect-docker/src/gen/v1.53/GenericResources.ts new file mode 100644 index 0000000..fadf68f --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/GenericResources.ts @@ -0,0 +1,26 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +/** + * User-defined resources can be either Integer resources (e.g, `SSD=3`) or String resources (e.g, + * `GPU=UUID1`). + */ +export const GenericResources = S.Array( + S.Struct({ + NamedResourceSpec: S.optional( + S.Struct({ + Kind: S.optional(S.String), + Value: S.optional(S.String), + }), + ), + DiscreteResourceSpec: S.optional( + S.Struct({ + Kind: S.optional(S.String), + Value: S.optional(pipe(S.Number, S.int())), + }), + ), + }), +); +export type GenericResources = S.Schema.Type; +export const GenericResourcesEncoded = S.encodedSchema(GenericResources); +export type GenericResourcesEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/Health.ts b/packages/effect-docker/src/gen/v1.53/Health.ts new file mode 100644 index 0000000..8ff846e --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/Health.ts @@ -0,0 +1,24 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +import { HealthcheckResult } from './HealthcheckResult.ts'; + +/** Health stores information about the container's healthcheck results. */ +export const Health = S.Struct({ + /** + * Status is one of `none`, `starting`, `healthy` or `unhealthy` + * + * - "none" Indicates there is no healthcheck + * - "starting" Starting indicates that the container is not yet ready + * - "healthy" Healthy indicates that the container is running correctly + * - "unhealthy" Unhealthy indicates that the container has a problem + */ + Status: S.optional(S.Literal('none', 'starting', 'healthy', 'unhealthy')), + /** FailingStreak is the number of consecutive failures */ + FailingStreak: S.optional(pipe(S.Number, S.int())), + /** Log contains the last few results (oldest first) */ + Log: S.optional(S.Array(HealthcheckResult)), +}); +export type Health = S.Schema.Type; +export const HealthEncoded = S.encodedSchema(Health); +export type HealthEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/HealthConfig.ts b/packages/effect-docker/src/gen/v1.53/HealthConfig.ts new file mode 100644 index 0000000..8422501 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/HealthConfig.ts @@ -0,0 +1,56 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +/** + * A test to perform to check that the container is healthy. Healthcheck commands should be + * side-effect free. + */ +export const HealthConfig = S.Struct({ + /** + * The test to perform. Possible values are: + * + * - `[]` inherit healthcheck from image or parent image + * - `["NONE"]` disable healthcheck + * - `["CMD", args...]` exec arguments directly + * - `["CMD-SHELL", command]` run command with system's default shell + * + * A non-zero exit code indicates a failed healthcheck: + * + * - `0` healthy + * - `1` unhealthy + * - `2` reserved (treated as unhealthy) + * - Other values: error running probe + */ + Test: S.optional(S.Array(S.String)), + /** + * The time to wait between checks in nanoseconds. It should be 0 or at least 1000000 (1 ms). 0 + * means inherit. + */ + Interval: S.optional(pipe(S.Number, S.int())), + /** + * The time to wait before considering the check to have hung. It should be 0 or at least 1000000 + * (1 ms). 0 means inherit. + * + * If the health check command does not complete within this timeout, the check is considered + * failed and the health check process is forcibly terminated without a graceful shutdown. + */ + Timeout: S.optional(pipe(S.Number, S.int())), + /** + * The number of consecutive failures needed to consider a container as unhealthy. 0 means + * inherit. + */ + Retries: S.optional(pipe(S.Number, S.int())), + /** + * Start period for the container to initialize before starting health-retries countdown in + * nanoseconds. It should be 0 or at least 1000000 (1 ms). 0 means inherit. + */ + StartPeriod: S.optional(pipe(S.Number, S.int())), + /** + * The time to wait between checks in nanoseconds during the start period. It should be 0 or at + * least 1000000 (1 ms). 0 means inherit. + */ + StartInterval: S.optional(pipe(S.Number, S.int())), +}); +export type HealthConfig = S.Schema.Type; +export const HealthConfigEncoded = S.encodedSchema(HealthConfig); +export type HealthConfigEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/HealthcheckResult.ts b/packages/effect-docker/src/gen/v1.53/HealthcheckResult.ts new file mode 100644 index 0000000..87459d3 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/HealthcheckResult.ts @@ -0,0 +1,30 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +/** HealthcheckResult stores information about a single run of a healthcheck probe */ +export const HealthcheckResult = S.Struct({ + /** + * Date and time at which this check started in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) + * format with nano-seconds. + */ + Start: S.optional(S.Date), + /** + * Date and time at which this check ended in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) + * format with nano-seconds. + */ + End: S.optional(S.String), + /** + * ExitCode meanings: + * + * - `0` healthy + * - `1` unhealthy + * - `2` reserved (considered unhealthy) + * - Other values: error running probe + */ + ExitCode: S.optional(pipe(S.Number, S.int())), + /** Output from last check */ + Output: S.optional(S.String), +}); +export type HealthcheckResult = S.Schema.Type; +export const HealthcheckResultEncoded = S.encodedSchema(HealthcheckResult); +export type HealthcheckResultEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/IDResponse.ts b/packages/effect-docker/src/gen/v1.53/IDResponse.ts new file mode 100644 index 0000000..cb25bf8 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/IDResponse.ts @@ -0,0 +1,11 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +/** Response to an API call that returns just an Id */ +export const IDResponse = S.Struct({ + /** The id of the newly created object. */ + Id: S.String, +}); +export type IDResponse = S.Schema.Type; +export const IDResponseEncoded = S.encodedSchema(IDResponse); +export type IDResponseEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/IPAM.ts b/packages/effect-docker/src/gen/v1.53/IPAM.ts new file mode 100644 index 0000000..00aa14b --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/IPAM.ts @@ -0,0 +1,22 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +import { IPAMConfig } from './IPAMConfig.ts'; + +export const IPAM = S.Struct({ + /** Name of the IPAM driver to use. */ + Driver: S.optionalWith(S.String, { + default: () => 'default', + }), + /** + * List of IPAM configuration options, specified as a map: + * + * {"Subnet": , "IPRange": , "Gateway": , "AuxAddress": } + */ + Config: S.optional(S.Array(IPAMConfig)), + /** Driver-specific options, specified as a map. */ + Options: S.optional(S.Record({ key: S.String, value: S.String })), +}); +export type IPAM = S.Schema.Type; +export const IPAMEncoded = S.encodedSchema(IPAM); +export type IPAMEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/IPAMConfig.ts b/packages/effect-docker/src/gen/v1.53/IPAMConfig.ts new file mode 100644 index 0000000..79465f4 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/IPAMConfig.ts @@ -0,0 +1,12 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +export const IPAMConfig = S.Struct({ + Subnet: S.optional(S.String), + IPRange: S.optional(S.String), + Gateway: S.optional(S.String), + AuxiliaryAddresses: S.optional(S.Record({ key: S.String, value: S.String })), +}); +export type IPAMConfig = S.Schema.Type; +export const IPAMConfigEncoded = S.encodedSchema(IPAMConfig); +export type IPAMConfigEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/IPAMStatus.ts b/packages/effect-docker/src/gen/v1.53/IPAMStatus.ts new file mode 100644 index 0000000..8120799 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/IPAMStatus.ts @@ -0,0 +1,11 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +import { SubnetStatus } from './SubnetStatus.ts'; + +export const IPAMStatus = S.Struct({ + Subnets: S.optional(S.Record({ key: S.String, value: SubnetStatus })), +}); +export type IPAMStatus = S.Schema.Type; +export const IPAMStatusEncoded = S.encodedSchema(IPAMStatus); +export type IPAMStatusEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/Identity.ts b/packages/effect-docker/src/gen/v1.53/Identity.ts new file mode 100644 index 0000000..11889e3 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/Identity.ts @@ -0,0 +1,27 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +import { SignatureIdentity } from './SignatureIdentity.ts'; +import { PullIdentity } from './PullIdentity.ts'; +import { BuildIdentity } from './BuildIdentity.ts'; + +/** + * Identity holds information about the identity and origin of the image. This is trusted + * information verified by the daemon and cannot be modified by tagging an image to a different + * name. + */ +export const Identity = S.Struct({ + /** Signature contains the properties of verified signatures for the image. */ + Signature: S.optional(S.Array(SignatureIdentity)), + /** + * Pull contains remote location information if image was created via pull. If image was pulled + * via mirror, this contains the original repository location. After successful push this images + * also contains the pushed repository location. + */ + Pull: S.optional(S.Array(PullIdentity)), + /** Build contains build reference information if image was created via build. */ + Build: S.optional(S.Array(BuildIdentity)), +}); +export type Identity = S.Schema.Type; +export const IdentityEncoded = S.encodedSchema(Identity); +export type IdentityEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/ImageConfig.ts b/packages/effect-docker/src/gen/v1.53/ImageConfig.ts new file mode 100644 index 0000000..2e156ee --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/ImageConfig.ts @@ -0,0 +1,54 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +import { HealthConfig } from './HealthConfig.ts'; + +/** + * Configuration of the image. These fields are used as defaults when starting a container from the + * image. + */ +export const ImageConfig = S.Struct({ + /** The user that commands are run as inside the container. */ + User: S.optional(S.String), + /** + * An object mapping ports to an empty object in the form: + * + * `{"/": {}}` + */ + ExposedPorts: S.optional(S.Record({ key: S.String, value: S.Struct({}) })), + /** + * A list of environment variables to set inside the container in the form `["VAR=value", ...]`. A + * variable without `=` is removed from the environment, rather than to have an empty value. + */ + Env: S.optional(S.Array(S.String)), + /** Command to run specified as a string or an array of strings. */ + Cmd: S.optional(S.Array(S.String)), + Healthcheck: S.optional(HealthConfig), + /** Command is already escaped (Windows only) */ + ArgsEscaped: S.optionalWith(S.Boolean, { + default: () => false, + }), + /** An object mapping mount point paths inside the container to empty objects. */ + Volumes: S.optional(S.Record({ key: S.String, value: S.Struct({}) })), + /** The working directory for commands to run in. */ + WorkingDir: S.optional(S.String), + /** + * The entry point for the container as a string or an array of strings. + * + * If the array consists of exactly one empty string (`[""]`) then the entry point is reset to + * system default (i.e., the entry point used by docker when there is no `ENTRYPOINT` instruction + * in the `Dockerfile`). + */ + Entrypoint: S.optional(S.Array(S.String)), + /** `ONBUILD` metadata that were defined in the image's `Dockerfile`. */ + OnBuild: S.optional(S.Array(S.String)), + /** User-defined key/value metadata. */ + Labels: S.optional(S.Record({ key: S.String, value: S.String })), + /** Signal to stop a container as a string or unsigned integer. */ + StopSignal: S.optional(S.String), + /** Shell for when `RUN`, `CMD`, and `ENTRYPOINT` uses a shell. */ + Shell: S.optional(S.Array(S.String)), +}); +export type ImageConfig = S.Schema.Type; +export const ImageConfigEncoded = S.encodedSchema(ImageConfig); +export type ImageConfigEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/ImageDeleteResponseItem.ts b/packages/effect-docker/src/gen/v1.53/ImageDeleteResponseItem.ts new file mode 100644 index 0000000..5e450db --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/ImageDeleteResponseItem.ts @@ -0,0 +1,12 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +export const ImageDeleteResponseItem = S.Struct({ + /** The image ID of an image that was untagged */ + Untagged: S.optional(S.String), + /** The image ID of an image that was deleted */ + Deleted: S.optional(S.String), +}); +export type ImageDeleteResponseItem = S.Schema.Type; +export const ImageDeleteResponseItemEncoded = S.encodedSchema(ImageDeleteResponseItem); +export type ImageDeleteResponseItemEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/ImageHistoryResponseItem.ts b/packages/effect-docker/src/gen/v1.53/ImageHistoryResponseItem.ts new file mode 100644 index 0000000..91ae1f9 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/ImageHistoryResponseItem.ts @@ -0,0 +1,15 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +/** Individual image layer information in response to ImageHistory operation */ +export const ImageHistoryResponseItem = S.Struct({ + Id: S.String, + Created: pipe(S.Number, S.int()), + CreatedBy: S.String, + Tags: S.Array(S.String), + Size: pipe(S.Number, S.int()), + Comment: S.String, +}); // HistoryResponseItem +export type ImageHistoryResponseItem = S.Schema.Type; +export const ImageHistoryResponseItemEncoded = S.encodedSchema(ImageHistoryResponseItem); +export type ImageHistoryResponseItemEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/ImageID.ts b/packages/effect-docker/src/gen/v1.53/ImageID.ts new file mode 100644 index 0000000..37687de --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/ImageID.ts @@ -0,0 +1,10 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +/** Image ID or Digest */ +export const ImageID = S.Struct({ + ID: S.optional(S.String), +}); +export type ImageID = S.Schema.Type; +export const ImageIDEncoded = S.encodedSchema(ImageID); +export type ImageIDEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/ImageInspect.ts b/packages/effect-docker/src/gen/v1.53/ImageInspect.ts new file mode 100644 index 0000000..04080fc --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/ImageInspect.ts @@ -0,0 +1,104 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +import { OCIDescriptor } from './OCIDescriptor.ts'; +import { ImageManifestSummary } from './ImageManifestSummary.ts'; +import { Identity } from './Identity.ts'; +import { ImageConfig } from './ImageConfig.ts'; +import { DriverData } from './DriverData.ts'; + +/** Information about an image in the local image cache. */ +export const ImageInspect = S.Struct({ + /** + * ID is the content-addressable ID of an image. + * + * This identifier is a content-addressable digest calculated from the image's configuration + * (which includes the digests of layers used by the image). + * + * Note that this digest differs from the `RepoDigests` below, which holds digests of image + * manifests that reference the image. + */ + Id: S.optional(S.String), + Descriptor: S.optional(OCIDescriptor), + /** + * Manifests is a list of image manifests available in this image. It provides a more detailed + * view of the platform-specific image manifests or other image-attached data like build + * attestations. + * + * Only available if the daemon provides a multi-platform image store and the `manifests` option + * is set in the inspect request. + * + * WARNING: This is experimental and may change at any time without any backward compatibility. + */ + Manifests: S.optional(S.Array(ImageManifestSummary)), + Identity: S.optional(Identity), + /** + * List of image names/tags in the local image cache that reference this image. + * + * Multiple image tags can refer to the same image, and this list may be empty if no tags + * reference the image, in which case the image is "untagged", in which case it can still be + * referenced by its ID. + */ + RepoTags: S.optional(S.Array(S.String)), + /** + * List of content-addressable digests of locally available image manifests that the image is + * referenced from. Multiple manifests can refer to the same image. + * + * These digests are usually only available if the image was either pulled from a registry, or if + * the image was pushed to a registry, which is when the manifest is generated and its digest + * calculated. + */ + RepoDigests: S.optional(S.Array(S.String)), + /** Optional message that was set when committing or importing the image. */ + Comment: S.optional(S.String), + /** + * Date and time at which the image was created, formatted in [RFC + * 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + * + * This information is only available if present in the image, and omitted otherwise. + */ + Created: S.optional(S.String), + /** + * Name of the author that was specified when committing the image, or as specified through + * MAINTAINER (deprecated) in the Dockerfile. + */ + Author: S.optional(S.String), + Config: S.optional(ImageConfig), + /** Hardware CPU architecture that the image runs on. */ + Architecture: S.optional(S.String), + /** CPU architecture variant (presently ARM-only). */ + Variant: S.optional(S.String), + /** Operating System the image is built to run on. */ + Os: S.optional(S.String), + /** Operating System version the image is built to run on (especially for Windows). */ + OsVersion: S.optional(S.String), + /** Total size of the image including all layers it is composed of. */ + Size: S.optional(pipe(S.Number, S.int())), + GraphDriver: S.optional(DriverData), + /** Information about the image's RootFS, including the layer IDs. */ + RootFS: S.optional( + S.Struct({ + Type: S.String, + Layers: S.optional(S.Array(S.String)), + }), + ), + /** + * Additional metadata of the image in the local cache. This information is local to the daemon, + * and not part of the image itself. + */ + Metadata: S.optional( + S.Struct({ + /** + * Date and time at which the image was last tagged in [RFC + * 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + * + * This information is only available if the image was tagged locally, + * and omitted otherwise. + */ + LastTagTime: S.optional(S.String), + }), + ), +}); +export type ImageInspect = S.Schema.Type; +export const ImageInspectEncoded = S.encodedSchema(ImageInspect); +export type ImageInspectEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/ImageManifestSummary.ts b/packages/effect-docker/src/gen/v1.53/ImageManifestSummary.ts new file mode 100644 index 0000000..0162489 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/ImageManifestSummary.ts @@ -0,0 +1,71 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +import { OCIDescriptor } from './OCIDescriptor.ts'; +import { OCIPlatform } from './OCIPlatform.ts'; + +/** ImageManifestSummary represents a summary of an image manifest. */ +export const ImageManifestSummary = S.Struct({ + /** + * ID is the content-addressable ID of an image and is the same as the digest of the image + * manifest. + */ + ID: S.String, + Descriptor: OCIDescriptor, + /** Indicates whether all the child content (image config, layers) is fully available locally. */ + Available: S.Boolean, + Size: S.Struct({ + /** + * Total is the total size (in bytes) of all the locally present data (both distributable and + * non-distributable) that's related to this manifest and its children. This equal to the sum of + * [Content] size AND all the sizes in the [Size] struct present in the Kind-specific data + * struct. For example, for an image kind (Kind == "image") this would include the size of the + * image content and unpacked image snapshots ([Size.Content] + [ImageData.Size.Unpacked]). + */ + Total: pipe(S.Number, S.int()), + /** + * Content is the size (in bytes) of all the locally present content in the content store (e.g. + * image config, layers) referenced by this manifest and its children. This only includes blobs + * in the content store. + */ + Content: pipe(S.Number, S.int()), + }), + /** + * The kind of the manifest. + * + * Kind | description -------------|----------------------------------------------------------- + * image | Image manifest that can be used to start a container. attestation | Attestation + * manifest produced by the Buildkit builder for a specific image manifest. + */ + Kind: S.Literal('image', 'attestation', 'unknown'), + /** The image data for the image manifest. This field is only populated when Kind is "image". */ + ImageData: S.optional( + S.Struct({ + Platform: OCIPlatform, + /** The IDs of the containers that are using this image. */ + Containers: S.Array(S.String), + Size: S.Struct({ + /** + * Unpacked is the size (in bytes) of the locally unpacked (uncompressed) image content that's + * directly usable by the containers running this image. It's independent of the distributable + * content - e.g. the image might still have an unpacked data that's still used by some + * container even when the distributable/compressed content is already gone. + */ + Unpacked: pipe(S.Number, S.int()), + }), + }), + ), + /** + * The image data for the attestation manifest. This field is only populated when Kind is + * "attestation". + */ + AttestationData: S.optional( + S.Struct({ + /** The digest of the image manifest that this attestation is for. */ + For: S.String, + }), + ), +}); +export type ImageManifestSummary = S.Schema.Type; +export const ImageManifestSummaryEncoded = S.encodedSchema(ImageManifestSummary); +export type ImageManifestSummaryEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/ImageSummary.ts b/packages/effect-docker/src/gen/v1.53/ImageSummary.ts new file mode 100644 index 0000000..779459d --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/ImageSummary.ts @@ -0,0 +1,76 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +import { ImageManifestSummary } from './ImageManifestSummary.ts'; +import { OCIDescriptor } from './OCIDescriptor.ts'; + +export const ImageSummary = S.Struct({ + /** + * ID is the content-addressable ID of an image. + * + * This identifier is a content-addressable digest calculated from the image's configuration + * (which includes the digests of layers used by the image). + * + * Note that this digest differs from the `RepoDigests` below, which holds digests of image + * manifests that reference the image. + */ + Id: S.String, + /** + * ID of the parent image. + * + * Depending on how the image was created, this field may be empty and is only set for images that + * were built/created locally. This field is empty if the image was pulled from an image + * registry. + */ + ParentId: S.String, + /** + * List of image names/tags in the local image cache that reference this image. + * + * Multiple image tags can refer to the same image, and this list may be empty if no tags + * reference the image, in which case the image is "untagged", in which case it can still be + * referenced by its ID. + */ + RepoTags: S.Array(S.String), + /** + * List of content-addressable digests of locally available image manifests that the image is + * referenced from. Multiple manifests can refer to the same image. + * + * These digests are usually only available if the image was either pulled from a registry, or if + * the image was pushed to a registry, which is when the manifest is generated and its digest + * calculated. + */ + RepoDigests: S.Array(S.String), + /** + * Date and time at which the image was created as a Unix timestamp (number of seconds since + * EPOCH). + */ + Created: pipe(S.Number, S.int()), + /** Total size of the image including all layers it is composed of. */ + Size: pipe(S.Number, S.int()), + /** + * Total size of image layers that are shared between this image and other images. + * + * This size is not calculated by default. `-1` indicates that the value has not been set / + * calculated. + */ + SharedSize: pipe(S.Number, S.int()), + /** User-defined key/value metadata. */ + Labels: S.Record({ key: S.String, value: S.String }), + /** + * Number of containers using this image. Includes both stopped and running containers. + * + * `-1` indicates that the value has not been set / calculated. + */ + Containers: pipe(S.Number, S.int()), + /** + * Manifests is a list of manifests available in this image. It provides a more detailed view of + * the platform-specific image manifests or other image-attached data like build attestations. + * + * WARNING: This is experimental and may change at any time without any backward compatibility. + */ + Manifests: S.optional(S.Array(ImageManifestSummary)), + Descriptor: S.optional(OCIDescriptor), +}); +export type ImageSummary = S.Schema.Type; +export const ImageSummaryEncoded = S.encodedSchema(ImageSummary); +export type ImageSummaryEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/ImagesDiskUsage.ts b/packages/effect-docker/src/gen/v1.53/ImagesDiskUsage.ts new file mode 100644 index 0000000..fbd3871 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/ImagesDiskUsage.ts @@ -0,0 +1,19 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +/** Represents system data usage for image resources. */ +export const ImagesDiskUsage = S.Struct({ + /** Count of active images. */ + ActiveCount: S.optional(pipe(S.Number, S.int())), + /** Count of all images. */ + TotalCount: S.optional(pipe(S.Number, S.int())), + /** Disk space that can be reclaimed by removing unused images. */ + Reclaimable: S.optional(pipe(S.Number, S.int())), + /** Disk space in use by images. */ + TotalSize: S.optional(pipe(S.Number, S.int())), + /** List of image summaries. */ + Items: S.optional(S.Array(S.Struct({}))), +}); +export type ImagesDiskUsage = S.Schema.Type; +export const ImagesDiskUsageEncoded = S.encodedSchema(ImagesDiskUsage); +export type ImagesDiskUsageEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/IndexInfo.ts b/packages/effect-docker/src/gen/v1.53/IndexInfo.ts new file mode 100644 index 0000000..0d8b250 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/IndexInfo.ts @@ -0,0 +1,27 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +/** IndexInfo contains information about a registry. */ +export const IndexInfo = S.Struct({ + /** Name of the registry, such as "docker.io". */ + Name: S.optional(S.String), + /** List of mirrors, expressed as URIs. */ + Mirrors: S.optional(S.Array(S.String)), + /** + * Indicates if the registry is part of the list of insecure registries. + * + * If `false`, the registry is insecure. Insecure registries accept un-encrypted (HTTP) and/or + * untrusted (HTTPS with certificates from unknown CAs) communication. + * + * > **Warning**: Insecure registries can be useful when running a local registry. However, because + * > its use creates security vulnerabilities it should ONLY be enabled for testing purposes. For + * > increased security, users should add their CA to their system's list of trusted CAs instead of + * > enabling this option. + */ + Secure: S.optional(S.Boolean), + /** Indicates whether this is an official registry (i.e., Docker Hub / docker.io) */ + Official: S.optional(S.Boolean), +}); +export type IndexInfo = S.Schema.Type; +export const IndexInfoEncoded = S.encodedSchema(IndexInfo); +export type IndexInfoEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/JoinTokens.ts b/packages/effect-docker/src/gen/v1.53/JoinTokens.ts new file mode 100644 index 0000000..5b31ad2 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/JoinTokens.ts @@ -0,0 +1,13 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +/** JoinTokens contains the tokens workers and managers need to join the swarm. */ +export const JoinTokens = S.Struct({ + /** The token workers can use to join the swarm. */ + Worker: S.optional(S.String), + /** The token managers can use to join the swarm. */ + Manager: S.optional(S.String), +}); +export type JoinTokens = S.Schema.Type; +export const JoinTokensEncoded = S.encodedSchema(JoinTokens); +export type JoinTokensEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/KnownSignerIdentity.ts b/packages/effect-docker/src/gen/v1.53/KnownSignerIdentity.ts new file mode 100644 index 0000000..2db198e --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/KnownSignerIdentity.ts @@ -0,0 +1,11 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +/** + * KnownSignerIdentity is an identifier for a special signer identity that is known to the + * implementation. + */ +export const KnownSignerIdentity = S.Literal('DHI'); +export type KnownSignerIdentity = S.Schema.Type; +export const KnownSignerIdentityEncoded = S.encodedSchema(KnownSignerIdentity); +export type KnownSignerIdentityEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/Limit.ts b/packages/effect-docker/src/gen/v1.53/Limit.ts new file mode 100644 index 0000000..5bae44e --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/Limit.ts @@ -0,0 +1,15 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +/** An object describing a limit on resources which can be requested by a task. */ +export const Limit = S.Struct({ + NanoCPUs: S.optional(pipe(S.Number, S.int())), + MemoryBytes: S.optional(pipe(S.Number, S.int())), + /** Limits the maximum number of PIDs in the container. Set `0` for unlimited. */ + Pids: S.optionalWith(pipe(S.Number, S.int()), { + default: () => 0, + }), +}); +export type Limit = S.Schema.Type; +export const LimitEncoded = S.encodedSchema(Limit); +export type LimitEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/LocalNodeState.ts b/packages/effect-docker/src/gen/v1.53/LocalNodeState.ts new file mode 100644 index 0000000..914935d --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/LocalNodeState.ts @@ -0,0 +1,8 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +/** Current local status of this node. */ +export const LocalNodeState = S.Literal('', 'inactive', 'pending', 'active', 'error', 'locked'); +export type LocalNodeState = S.Schema.Type; +export const LocalNodeStateEncoded = S.encodedSchema(LocalNodeState); +export type LocalNodeStateEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/ManagerStatus.ts b/packages/effect-docker/src/gen/v1.53/ManagerStatus.ts new file mode 100644 index 0000000..359152b --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/ManagerStatus.ts @@ -0,0 +1,21 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +import { Reachability } from './Reachability.ts'; + +/** + * ManagerStatus represents the status of a manager. + * + * It provides the current status of a node's manager component, if the node is a manager. + */ +export const ManagerStatus = S.Struct({ + Leader: S.optionalWith(S.Boolean, { + default: () => false, + }), + Reachability: S.optional(Reachability), + /** The IP address and port at which the manager is reachable. */ + Addr: S.optional(S.String), +}); +export type ManagerStatus = S.Schema.Type; +export const ManagerStatusEncoded = S.encodedSchema(ManagerStatus); +export type ManagerStatusEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/Mount.ts b/packages/effect-docker/src/gen/v1.53/Mount.ts new file mode 100644 index 0000000..24dda22 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/Mount.ts @@ -0,0 +1,104 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +import { MountType } from './MountType.ts'; + +export const Mount = S.Struct({ + /** Container path. */ + Target: S.optional(S.String), + /** + * Mount source (e.g. a volume name, a host path). The source cannot be specified when using + * `Type=tmpfs`. For `Type=bind`, the source path must either exist, or the `CreateMountpoint` + * must be set to `true` to create the source path on the host if missing. + * + * For `Type=npipe`, the pipe must exist prior to creating the container. + */ + Source: S.optional(S.String), + Type: S.optional(MountType), + /** Whether the mount should be read-only. */ + ReadOnly: S.optional(S.Boolean), + /** The consistency requirement for the mount: `default`, `consistent`, `cached`, or `delegated`. */ + Consistency: S.optional(S.String), + /** Optional configuration for the `bind` type. */ + BindOptions: S.optional( + S.Struct({ + /** A propagation mode with the value `[r]private`, `[r]shared`, or `[r]slave`. */ + Propagation: S.optional( + S.Literal('private', 'rprivate', 'shared', 'rshared', 'slave', 'rslave'), + ), + /** Disable recursive bind mount. */ + NonRecursive: S.optionalWith(S.Boolean, { + default: () => false, + }), + /** Create mount point on host if missing */ + CreateMountpoint: S.optionalWith(S.Boolean, { + default: () => false, + }), + /** + * Make the mount non-recursively read-only, but still leave the mount recursive (unless + * NonRecursive is set to `true` in conjunction). + * + * Added in v1.44, before that version all read-only mounts were + * non-recursive by default. To match the previous behaviour this + * will default to `true` for clients on versions prior to v1.44. + */ + ReadOnlyNonRecursive: S.optionalWith(S.Boolean, { + default: () => false, + }), + /** Raise an error if the mount cannot be made recursively read-only. */ + ReadOnlyForceRecursive: S.optionalWith(S.Boolean, { + default: () => false, + }), + }), + ), + /** Optional configuration for the `volume` type. */ + VolumeOptions: S.optional( + S.Struct({ + /** Populate volume with data from the target. */ + NoCopy: S.optionalWith(S.Boolean, { + default: () => false, + }), + /** User-defined key/value metadata. */ + Labels: S.optional(S.Record({ key: S.String, value: S.String })), + /** Map of driver specific options */ + DriverConfig: S.optional( + S.Struct({ + /** Name of the driver to use to create the volume. */ + Name: S.optional(S.String), + /** Key/value map of driver specific options. */ + Options: S.optional(S.Record({ key: S.String, value: S.String })), + }), + ), + /** Source path inside the volume. Must be relative without any back traversals. */ + Subpath: S.optional(S.String), + }), + ), + /** Optional configuration for the `image` type. */ + ImageOptions: S.optional( + S.Struct({ + /** Source path inside the image. Must be relative without any back traversals. */ + Subpath: S.optional(S.String), + }), + ), + /** Optional configuration for the `tmpfs` type. */ + TmpfsOptions: S.optional( + S.Struct({ + /** The size for the tmpfs mount in bytes. */ + SizeBytes: S.optional(pipe(S.Number, S.int())), + /** + * The permission mode for the tmpfs mount in an integer. The value must not be in octal format + * (e.g. 755) but rather the decimal representation of the octal value (e.g. 493). + */ + Mode: S.optional(pipe(S.Number, S.int())), + /** + * The options to be passed to the tmpfs mount. An array of arrays. Flag options should be + * provided as 1-length arrays. Other types should be provided as as 2-length arrays, where the + * first item is the key and the second the value. + */ + Options: S.optional(S.Array(S.Array(S.String))), + }), + ), +}); +export type Mount = S.Schema.Type; +export const MountEncoded = S.encodedSchema(Mount); +export type MountEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/MountPoint.ts b/packages/effect-docker/src/gen/v1.53/MountPoint.ts new file mode 100644 index 0000000..80ae1ee --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/MountPoint.ts @@ -0,0 +1,48 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +import { MountType } from './MountType.ts'; + +/** + * MountPoint represents a mount point configuration inside the container. This is used for + * reporting the mountpoints in use by a container. + */ +export const MountPoint = S.Struct({ + Type: S.optional(MountType), + /** Name is the name reference to the underlying data defined by `Source` e.g., the volume name. */ + Name: S.optional(S.String), + /** + * Source location of the mount. + * + * For volumes, this contains the storage location of the volume (within + * `/var/lib/docker/volumes/`). For bind-mounts, and `npipe`, this contains the source (host) part + * of the bind-mount. For `tmpfs` mount points, this field is empty. + */ + Source: S.optional(S.String), + /** + * Destination is the path relative to the container root (`/`) where the `Source` is mounted + * inside the container. + */ + Destination: S.optional(S.String), + /** Driver is the volume driver used to create the volume (if it is a volume). */ + Driver: S.optional(S.String), + /** + * Mode is a comma separated list of options supplied by the user when creating the bind/volume + * mount. + * + * The default is platform-specific (`"z"` on Linux, empty on Windows). + */ + Mode: S.optional(S.String), + /** Whether the mount is mounted writable (read-write). */ + RW: S.optional(S.Boolean), + /** + * Propagation describes how mounts are propagated from the host into the mount point, and + * vice-versa. Refer to the [Linux kernel + * documentation](https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt) for + * details. This field is not used on Windows. + */ + Propagation: S.optional(S.String), +}); +export type MountPoint = S.Schema.Type; +export const MountPointEncoded = S.encodedSchema(MountPoint); +export type MountPointEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/MountType.ts b/packages/effect-docker/src/gen/v1.53/MountType.ts new file mode 100644 index 0000000..0fb2bfc --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/MountType.ts @@ -0,0 +1,17 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +/** + * The mount type. Available types: + * + * - `bind` a mount of a file or directory from the host into the container. + * - `cluster` a Swarm cluster volume. + * - `image` an OCI image. + * - `npipe` a named pipe from the host into the container. + * - `tmpfs` a `tmpfs`. + * - `volume` a docker volume with the given `Name`. + */ +export const MountType = S.Literal('bind', 'cluster', 'image', 'npipe', 'tmpfs', 'volume'); +export type MountType = S.Schema.Type; +export const MountTypeEncoded = S.encodedSchema(MountType); +export type MountTypeEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/NRIInfo.ts b/packages/effect-docker/src/gen/v1.53/NRIInfo.ts new file mode 100644 index 0000000..8945cc0 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/NRIInfo.ts @@ -0,0 +1,20 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +/** + * Information about the Node Resource Interface (NRI). + * + * This field is only present if NRI is enabled. + */ +export const NRIInfo = S.Struct({ + /** + * Information about NRI, provided as "label" / "value" pairs.


+ * + * > **Note**: The information returned in this field, including the formatting of values and + * > labels, should not be considered stable, and may change without notice. + */ + Info: S.optional(S.Array(S.Array(S.String))), +}); +export type NRIInfo = S.Schema.Type; +export const NRIInfoEncoded = S.encodedSchema(NRIInfo); +export type NRIInfoEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/Network.ts b/packages/effect-docker/src/gen/v1.53/Network.ts new file mode 100644 index 0000000..fffef8f --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/Network.ts @@ -0,0 +1,66 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +import { IPAM } from './IPAM.ts'; +import { ConfigReference } from './ConfigReference.ts'; +import { PeerInfo } from './PeerInfo.ts'; + +export const Network = S.Struct({ + /** Name of the network. */ + Name: S.optional(S.String), + /** ID that uniquely identifies a network on a single machine. */ + Id: S.optional(S.String), + /** + * Date and time at which the network was created in [RFC + * 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + */ + Created: S.optional(S.String), + /** + * The level at which the network exists (e.g. `swarm` for cluster-wide or `local` for machine + * level) + */ + Scope: S.optional(S.String), + /** The name of the driver used to create the network (e.g. `bridge`, `overlay`). */ + Driver: S.optional(S.String), + /** Whether the network was created with IPv4 enabled. */ + EnableIPv4: S.optional(S.Boolean), + /** Whether the network was created with IPv6 enabled. */ + EnableIPv6: S.optional(S.Boolean), + IPAM: S.optional(IPAM), + /** Whether the network is created to only allow internal networking connectivity. */ + Internal: S.optionalWith(S.Boolean, { + default: () => false, + }), + /** + * Whether a global / swarm scope network is manually attachable by regular containers from + * workers in swarm mode. + */ + Attachable: S.optionalWith(S.Boolean, { + default: () => false, + }), + /** Whether the network is providing the routing-mesh for the swarm cluster. */ + Ingress: S.optionalWith(S.Boolean, { + default: () => false, + }), + ConfigFrom: S.optional(ConfigReference), + /** + * Whether the network is a config-only network. Config-only networks are placeholder networks for + * network configurations to be used by other networks. Config-only networks cannot be used + * directly to run containers or services. + */ + ConfigOnly: S.optionalWith(S.Boolean, { + default: () => false, + }), + /** Network-specific options uses when creating the network. */ + Options: S.optional(S.Record({ key: S.String, value: S.String })), + /** Metadata specific to the network being created. */ + Labels: S.optional(S.Record({ key: S.String, value: S.String })), + /** + * List of peer nodes for an overlay network. This field is only present for overlay networks, and + * omitted for other network types. + */ + Peers: S.optional(S.Array(PeerInfo)), +}); +export type Network = S.Schema.Type; +export const NetworkEncoded = S.encodedSchema(Network); +export type NetworkEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/NetworkAttachmentConfig.ts b/packages/effect-docker/src/gen/v1.53/NetworkAttachmentConfig.ts new file mode 100644 index 0000000..e22d12d --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/NetworkAttachmentConfig.ts @@ -0,0 +1,15 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +/** Specifies how a service should be attached to a particular network. */ +export const NetworkAttachmentConfig = S.Struct({ + /** The target network for attachment. Must be a network name or ID. */ + Target: S.optional(S.String), + /** Discoverable alternate names for the service on this network. */ + Aliases: S.optional(S.Array(S.String)), + /** Driver attachment options for the network target. */ + DriverOpts: S.optional(S.Record({ key: S.String, value: S.String })), +}); +export type NetworkAttachmentConfig = S.Schema.Type; +export const NetworkAttachmentConfigEncoded = S.encodedSchema(NetworkAttachmentConfig); +export type NetworkAttachmentConfigEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/NetworkConnectRequest.ts b/packages/effect-docker/src/gen/v1.53/NetworkConnectRequest.ts new file mode 100644 index 0000000..b7c902d --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/NetworkConnectRequest.ts @@ -0,0 +1,14 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +import { EndpointSettings } from './EndpointSettings.ts'; + +/** NetworkConnectRequest represents the data to be used to connect a container to a network. */ +export const NetworkConnectRequest = S.Struct({ + /** The ID or name of the container to connect to the network. */ + Container: S.String, + EndpointConfig: S.optional(EndpointSettings), +}); +export type NetworkConnectRequest = S.Schema.Type; +export const NetworkConnectRequestEncoded = S.encodedSchema(NetworkConnectRequest); +export type NetworkConnectRequestEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/NetworkCreateResponse.ts b/packages/effect-docker/src/gen/v1.53/NetworkCreateResponse.ts new file mode 100644 index 0000000..b0c8698 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/NetworkCreateResponse.ts @@ -0,0 +1,13 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +/** OK response to NetworkCreate operation */ +export const NetworkCreateResponse = S.Struct({ + /** The ID of the created network. */ + Id: S.String, + /** Warnings encountered when creating the container */ + Warning: S.String, +}); // NetworkCreateResponse +export type NetworkCreateResponse = S.Schema.Type; +export const NetworkCreateResponseEncoded = S.encodedSchema(NetworkCreateResponse); +export type NetworkCreateResponseEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/NetworkDisconnectRequest.ts b/packages/effect-docker/src/gen/v1.53/NetworkDisconnectRequest.ts new file mode 100644 index 0000000..3dbf7fd --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/NetworkDisconnectRequest.ts @@ -0,0 +1,15 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +/** NetworkDisconnectRequest represents the data to be used to disconnect a container from a network. */ +export const NetworkDisconnectRequest = S.Struct({ + /** The ID or name of the container to disconnect from the network. */ + Container: S.String, + /** Force the container to disconnect from the network. */ + Force: S.optionalWith(S.Boolean, { + default: () => false, + }), +}); +export type NetworkDisconnectRequest = S.Schema.Type; +export const NetworkDisconnectRequestEncoded = S.encodedSchema(NetworkDisconnectRequest); +export type NetworkDisconnectRequestEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/NetworkInspect.ts b/packages/effect-docker/src/gen/v1.53/NetworkInspect.ts new file mode 100644 index 0000000..1366f4f --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/NetworkInspect.ts @@ -0,0 +1,9 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +import { Network } from './Network.ts'; + +export const NetworkInspect = Network; +export type NetworkInspect = S.Schema.Type; +export const NetworkInspectEncoded = S.encodedSchema(NetworkInspect); +export type NetworkInspectEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/NetworkSettings.ts b/packages/effect-docker/src/gen/v1.53/NetworkSettings.ts new file mode 100644 index 0000000..3506807 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/NetworkSettings.ts @@ -0,0 +1,19 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +import { PortMap } from './PortMap.ts'; +import { EndpointSettings } from './EndpointSettings.ts'; + +/** NetworkSettings exposes the network settings in the API */ +export const NetworkSettings = S.Struct({ + /** SandboxID uniquely represents a container's network stack. */ + SandboxID: S.optional(S.String), + /** SandboxKey is the full path of the netns handle */ + SandboxKey: S.optional(S.String), + Ports: S.optional(PortMap), + /** Information about all networks that the container is connected to. */ + Networks: S.optional(S.Record({ key: S.String, value: EndpointSettings })), +}); +export type NetworkSettings = S.Schema.Type; +export const NetworkSettingsEncoded = S.encodedSchema(NetworkSettings); +export type NetworkSettingsEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/NetworkStatus.ts b/packages/effect-docker/src/gen/v1.53/NetworkStatus.ts new file mode 100644 index 0000000..1d19804 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/NetworkStatus.ts @@ -0,0 +1,12 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +import { IPAMStatus } from './IPAMStatus.ts'; + +/** Provides runtime information about the network such as the number of allocated IPs. */ +export const NetworkStatus = S.Struct({ + IPAM: S.optional(IPAMStatus), +}); +export type NetworkStatus = S.Schema.Type; +export const NetworkStatusEncoded = S.encodedSchema(NetworkStatus); +export type NetworkStatusEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/NetworkSummary.ts b/packages/effect-docker/src/gen/v1.53/NetworkSummary.ts new file mode 100644 index 0000000..328f04e --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/NetworkSummary.ts @@ -0,0 +1,9 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +import { Network } from './Network.ts'; + +export const NetworkSummary = Network; +export type NetworkSummary = S.Schema.Type; +export const NetworkSummaryEncoded = S.encodedSchema(NetworkSummary); +export type NetworkSummaryEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/NetworkTaskInfo.ts b/packages/effect-docker/src/gen/v1.53/NetworkTaskInfo.ts new file mode 100644 index 0000000..f8c25e6 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/NetworkTaskInfo.ts @@ -0,0 +1,13 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +/** Carries the information about one backend task */ +export const NetworkTaskInfo = S.Struct({ + Name: S.optional(S.String), + EndpointID: S.optional(S.String), + EndpointIP: S.optional(S.String), + Info: S.optional(S.Record({ key: S.String, value: S.String })), +}); +export type NetworkTaskInfo = S.Schema.Type; +export const NetworkTaskInfoEncoded = S.encodedSchema(NetworkTaskInfo); +export type NetworkTaskInfoEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/NetworkingConfig.ts b/packages/effect-docker/src/gen/v1.53/NetworkingConfig.ts new file mode 100644 index 0000000..b5a8388 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/NetworkingConfig.ts @@ -0,0 +1,21 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +import { EndpointSettings } from './EndpointSettings.ts'; + +/** + * NetworkingConfig represents the container's networking configuration for each of its interfaces. + * It is used for the networking configs specified in the `docker create` and `docker network + * connect` commands. + */ +export const NetworkingConfig = S.Struct({ + /** + * A mapping of network name to endpoint configuration for that network. The endpoint + * configuration can be left empty to connect to that network with no particular endpoint + * configuration. + */ + EndpointsConfig: S.optional(S.Record({ key: S.String, value: EndpointSettings })), +}); +export type NetworkingConfig = S.Schema.Type; +export const NetworkingConfigEncoded = S.encodedSchema(NetworkingConfig); +export type NetworkingConfigEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/Node.ts b/packages/effect-docker/src/gen/v1.53/Node.ts new file mode 100644 index 0000000..65af8bb --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/Node.ts @@ -0,0 +1,30 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +import { ObjectVersion } from './ObjectVersion.ts'; +import { NodeSpec } from './NodeSpec.ts'; +import { NodeDescription } from './NodeDescription.ts'; +import { NodeStatus } from './NodeStatus.ts'; +import { ManagerStatus } from './ManagerStatus.ts'; + +export const Node = S.Struct({ + ID: S.optional(S.String), + Version: S.optional(ObjectVersion), + /** + * Date and time at which the node was added to the swarm in [RFC + * 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + */ + CreatedAt: S.optional(S.String), + /** + * Date and time at which the node was last updated in [RFC + * 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + */ + UpdatedAt: S.optional(S.String), + Spec: S.optional(NodeSpec), + Description: S.optional(NodeDescription), + Status: S.optional(NodeStatus), + ManagerStatus: S.optional(ManagerStatus), +}); +export type Node = S.Schema.Type; +export const NodeEncoded = S.encodedSchema(Node); +export type NodeEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/NodeDescription.ts b/packages/effect-docker/src/gen/v1.53/NodeDescription.ts new file mode 100644 index 0000000..d1ef78b --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/NodeDescription.ts @@ -0,0 +1,19 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +import { Platform } from './Platform.ts'; +import { ResourceObject } from './ResourceObject.ts'; +import { EngineDescription } from './EngineDescription.ts'; +import { TLSInfo } from './TLSInfo.ts'; + +/** NodeDescription encapsulates the properties of the Node as reported by the agent. */ +export const NodeDescription = S.Struct({ + Hostname: S.optional(S.String), + Platform: S.optional(Platform), + Resources: S.optional(ResourceObject), + Engine: S.optional(EngineDescription), + TLSInfo: S.optional(TLSInfo), +}); +export type NodeDescription = S.Schema.Type; +export const NodeDescriptionEncoded = S.encodedSchema(NodeDescription); +export type NodeDescriptionEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/NodeSpec.ts b/packages/effect-docker/src/gen/v1.53/NodeSpec.ts new file mode 100644 index 0000000..7779d1e --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/NodeSpec.ts @@ -0,0 +1,16 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +export const NodeSpec = S.Struct({ + /** Name for the node. */ + Name: S.optional(S.String), + /** User-defined key/value metadata. */ + Labels: S.optional(S.Record({ key: S.String, value: S.String })), + /** Role of the node. */ + Role: S.optional(S.Literal('worker', 'manager')), + /** Availability of the node. */ + Availability: S.optional(S.Literal('active', 'pause', 'drain')), +}); +export type NodeSpec = S.Schema.Type; +export const NodeSpecEncoded = S.encodedSchema(NodeSpec); +export type NodeSpecEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/NodeState.ts b/packages/effect-docker/src/gen/v1.53/NodeState.ts new file mode 100644 index 0000000..f96f97c --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/NodeState.ts @@ -0,0 +1,8 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +/** NodeState represents the state of a node. */ +export const NodeState = S.Literal('unknown', 'down', 'ready', 'disconnected'); +export type NodeState = S.Schema.Type; +export const NodeStateEncoded = S.encodedSchema(NodeState); +export type NodeStateEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/NodeStatus.ts b/packages/effect-docker/src/gen/v1.53/NodeStatus.ts new file mode 100644 index 0000000..cf3d11f --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/NodeStatus.ts @@ -0,0 +1,19 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +import { NodeState } from './NodeState.ts'; + +/** + * NodeStatus represents the status of a node. + * + * It provides the current status of the node, as seen by the manager. + */ +export const NodeStatus = S.Struct({ + State: S.optional(NodeState), + Message: S.optional(S.String), + /** IP address of the node. */ + Addr: S.optional(S.String), +}); +export type NodeStatus = S.Schema.Type; +export const NodeStatusEncoded = S.encodedSchema(NodeStatus); +export type NodeStatusEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/OCIDescriptor.ts b/packages/effect-docker/src/gen/v1.53/OCIDescriptor.ts new file mode 100644 index 0000000..231b528 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/OCIDescriptor.ts @@ -0,0 +1,34 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +import { OCIPlatform } from './OCIPlatform.ts'; + +/** + * A descriptor struct containing digest, media type, and size, as defined in the [OCI Content + * Descriptors + * Specification](https://github.com/opencontainers/image-spec/blob/v1.0.1/descriptor.md). + */ +export const OCIDescriptor = S.Struct({ + /** The media type of the object this schema refers to. */ + mediaType: S.optional(S.String), + /** The digest of the targeted content. */ + digest: S.optional(S.String), + /** The size in bytes of the blob. */ + size: S.optional(pipe(S.Number, S.int())), + /** List of URLs from which this object MAY be downloaded. */ + urls: S.optional(S.Array(S.String)), + /** Arbitrary metadata relating to the targeted content. */ + annotations: S.optional(S.Record({ key: S.String, value: S.String })), + /** + * Data is an embedding of the targeted content. This is encoded as a base64 string when + * marshalled to JSON (automatically, by encoding/json). If present, Data can be used directly to + * avoid fetching the targeted content. + */ + data: S.optional(S.String), + platform: S.optional(OCIPlatform), + /** ArtifactType is the IANA media type of this artifact. */ + artifactType: S.optional(S.String), +}); +export type OCIDescriptor = S.Schema.Type; +export const OCIDescriptorEncoded = S.encodedSchema(OCIDescriptor); +export type OCIDescriptorEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/OCIPlatform.ts b/packages/effect-docker/src/gen/v1.53/OCIPlatform.ts new file mode 100644 index 0000000..ddd2aee --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/OCIPlatform.ts @@ -0,0 +1,31 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +/** + * Describes the platform which the image in the manifest runs on, as defined in the [OCI Image + * Index Specification](https://github.com/opencontainers/image-spec/blob/v1.0.1/image-index.md). + */ +export const OCIPlatform = S.Struct({ + /** The CPU architecture, for example `amd64` or `ppc64`. */ + architecture: S.optional(S.String), + /** The operating system, for example `linux` or `windows`. */ + os: S.optional(S.String), + /** + * Optional field specifying the operating system version, for example on Windows + * `10.0.19041.1165`. + */ + 'os.version': S.optional(S.String), + /** + * Optional field specifying an array of strings, each listing a required OS feature (for example + * on Windows `win32k`). + */ + 'os.features': S.optional(S.Array(S.String)), + /** + * Optional field specifying a variant of the CPU, for example `v7` to specify ARMv7 when + * architecture is `arm`. + */ + variant: S.optional(S.String), +}); +export type OCIPlatform = S.Schema.Type; +export const OCIPlatformEncoded = S.encodedSchema(OCIPlatform); +export type OCIPlatformEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/ObjectVersion.ts b/packages/effect-docker/src/gen/v1.53/ObjectVersion.ts new file mode 100644 index 0000000..59b2173 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/ObjectVersion.ts @@ -0,0 +1,20 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +/** + * The version number of the object such as node, service, etc. This is needed to avoid conflicting + * writes. The client must send the version number along with the modified specification when + * updating these objects. + * + * This approach ensures safe concurrency and determinism in that the change on the object may not + * be applied if the version number has changed from the last read. In other words, if two update + * requests specify the same base version, only one of the requests can succeed. As a result, two + * separate update requests that happen at the same time will not unintentionally overwrite each + * other. + */ +export const ObjectVersion = S.Struct({ + Index: S.optional(pipe(S.Number, S.int())), +}); +export type ObjectVersion = S.Schema.Type; +export const ObjectVersionEncoded = S.encodedSchema(ObjectVersion); +export type ObjectVersionEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/PeerInfo.ts b/packages/effect-docker/src/gen/v1.53/PeerInfo.ts new file mode 100644 index 0000000..08470e8 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/PeerInfo.ts @@ -0,0 +1,13 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +/** Represents one peer of an overlay network. */ +export const PeerInfo = S.Struct({ + /** ID of the peer-node in the Swarm cluster. */ + Name: S.optional(S.String), + /** IP-address of the peer-node in the Swarm cluster. */ + IP: S.optional(S.String), +}); +export type PeerInfo = S.Schema.Type; +export const PeerInfoEncoded = S.encodedSchema(PeerInfo); +export type PeerInfoEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/PeerNode.ts b/packages/effect-docker/src/gen/v1.53/PeerNode.ts new file mode 100644 index 0000000..c69fdd6 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/PeerNode.ts @@ -0,0 +1,13 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +/** Represents a peer-node in the swarm */ +export const PeerNode = S.Struct({ + /** Unique identifier of for this node in the swarm. */ + NodeID: S.optional(S.String), + /** IP address and ports at which this node can be reached. */ + Addr: S.optional(S.String), +}); +export type PeerNode = S.Schema.Type; +export const PeerNodeEncoded = S.encodedSchema(PeerNode); +export type PeerNodeEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/Platform.ts b/packages/effect-docker/src/gen/v1.53/Platform.ts new file mode 100644 index 0000000..b3e6ff1 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/Platform.ts @@ -0,0 +1,13 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +/** Platform represents the platform (Arch/OS). */ +export const Platform = S.Struct({ + /** Architecture represents the hardware architecture (for example, `x86_64`). */ + Architecture: S.optional(S.String), + /** OS represents the Operating System (for example, `linux` or `windows`). */ + OS: S.optional(S.String), +}); +export type Platform = S.Schema.Type; +export const PlatformEncoded = S.encodedSchema(Platform); +export type PlatformEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/Plugin.ts b/packages/effect-docker/src/gen/v1.53/Plugin.ts new file mode 100644 index 0000000..0bfa735 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/Plugin.ts @@ -0,0 +1,71 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +import { PluginMount } from './PluginMount.ts'; +import { PluginDevice } from './PluginDevice.ts'; +import { PluginEnv } from './PluginEnv.ts'; + +/** A plugin for the Engine API */ +export const Plugin = S.Struct({ + Id: S.optional(S.String), + Name: S.String, + /** True if the plugin is running. False if the plugin is not running, only installed. */ + Enabled: S.Boolean, + /** User-configurable settings for the plugin. */ + Settings: S.Struct({ + Mounts: S.Array(PluginMount), + Env: S.Array(S.String), + Args: S.Array(S.String), + Devices: S.Array(PluginDevice), + }), + /** Plugin remote reference used to push/pull the plugin */ + PluginReference: S.optional(S.String), + /** The config of a plugin. */ + Config: S.Struct({ + Description: S.String, + Documentation: S.String, + /** The interface between Docker and the plugin */ + Interface: S.Struct({ + Types: S.Array(S.String), + Socket: S.String, + /** Protocol to use for clients connecting to the plugin. */ + ProtocolScheme: S.optional(S.Literal('', 'moby.plugins.http/v1')), + }), + Entrypoint: S.Array(S.String), + WorkDir: S.String, + User: S.optional( + S.Struct({ + UID: S.optional(pipe(S.Number, S.int())), + GID: S.optional(pipe(S.Number, S.int())), + }), + ), + Network: S.Struct({ + Type: S.String, + }), + Linux: S.Struct({ + Capabilities: S.Array(S.String), + AllowAllDevices: S.Boolean, + Devices: S.Array(PluginDevice), + }), + PropagatedMount: S.String, + IpcHost: S.Boolean, + PidHost: S.Boolean, + Mounts: S.Array(PluginMount), + Env: S.Array(PluginEnv), + Args: S.Struct({ + Name: S.String, + Description: S.String, + Settable: S.Array(S.String), + Value: S.Array(S.String), + }), + rootfs: S.optional( + S.Struct({ + type: S.optional(S.String), + diff_ids: S.optional(S.Array(S.String)), + }), + ), + }), +}); +export type Plugin = S.Schema.Type; +export const PluginEncoded = S.encodedSchema(Plugin); +export type PluginEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/PluginDevice.ts b/packages/effect-docker/src/gen/v1.53/PluginDevice.ts new file mode 100644 index 0000000..9f563c5 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/PluginDevice.ts @@ -0,0 +1,12 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +export const PluginDevice = S.Struct({ + Name: S.String, + Description: S.String, + Settable: S.Array(S.String), + Path: S.String, +}); +export type PluginDevice = S.Schema.Type; +export const PluginDeviceEncoded = S.encodedSchema(PluginDevice); +export type PluginDeviceEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/PluginEnv.ts b/packages/effect-docker/src/gen/v1.53/PluginEnv.ts new file mode 100644 index 0000000..66a30ee --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/PluginEnv.ts @@ -0,0 +1,12 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +export const PluginEnv = S.Struct({ + Name: S.String, + Description: S.String, + Settable: S.Array(S.String), + Value: S.String, +}); +export type PluginEnv = S.Schema.Type; +export const PluginEnvEncoded = S.encodedSchema(PluginEnv); +export type PluginEnvEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/PluginMount.ts b/packages/effect-docker/src/gen/v1.53/PluginMount.ts new file mode 100644 index 0000000..9ff42c0 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/PluginMount.ts @@ -0,0 +1,15 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +export const PluginMount = S.Struct({ + Name: S.String, + Description: S.String, + Settable: S.Array(S.String), + Source: S.String, + Destination: S.String, + Type: S.String, + Options: S.Array(S.String), +}); +export type PluginMount = S.Schema.Type; +export const PluginMountEncoded = S.encodedSchema(PluginMount); +export type PluginMountEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/PluginPrivilege.ts b/packages/effect-docker/src/gen/v1.53/PluginPrivilege.ts new file mode 100644 index 0000000..813325d --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/PluginPrivilege.ts @@ -0,0 +1,12 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +/** Describes a permission the user has to accept upon installing the plugin. */ +export const PluginPrivilege = S.Struct({ + Name: S.optional(S.String), + Description: S.optional(S.String), + Value: S.optional(S.Array(S.String)), +}); +export type PluginPrivilege = S.Schema.Type; +export const PluginPrivilegeEncoded = S.encodedSchema(PluginPrivilege); +export type PluginPrivilegeEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/PluginsInfo.ts b/packages/effect-docker/src/gen/v1.53/PluginsInfo.ts new file mode 100644 index 0000000..14fc13b --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/PluginsInfo.ts @@ -0,0 +1,22 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +/** + * Available plugins per type.


+ * + * > **Note**: Only unmanaged (V1) plugins are included in this list. V1 plugins are "lazily" loaded, + * > and are not returned in this list if there is no resource using the plugin. + */ +export const PluginsInfo = S.Struct({ + /** Names of available volume-drivers, and network-driver plugins. */ + Volume: S.optional(S.Array(S.String)), + /** Names of available network-drivers, and network-driver plugins. */ + Network: S.optional(S.Array(S.String)), + /** Names of available authorization plugins. */ + Authorization: S.optional(S.Array(S.String)), + /** Names of available logging-drivers, and logging-driver plugins. */ + Log: S.optional(S.Array(S.String)), +}); +export type PluginsInfo = S.Schema.Type; +export const PluginsInfoEncoded = S.encodedSchema(PluginsInfo); +export type PluginsInfoEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/PortBinding.ts b/packages/effect-docker/src/gen/v1.53/PortBinding.ts new file mode 100644 index 0000000..ec9c6cb --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/PortBinding.ts @@ -0,0 +1,13 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +/** PortBinding represents a binding between a host IP address and a host port. */ +export const PortBinding = S.Struct({ + /** Host IP address that the container's port is mapped to. */ + HostIp: S.optional(S.String), + /** Host port number that the container's port is mapped to. */ + HostPort: S.optional(S.String), +}); +export type PortBinding = S.Schema.Type; +export const PortBindingEncoded = S.encodedSchema(PortBinding); +export type PortBindingEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/PortMap.ts b/packages/effect-docker/src/gen/v1.53/PortMap.ts new file mode 100644 index 0000000..855b3cc --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/PortMap.ts @@ -0,0 +1,16 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +import { PortBinding } from './PortBinding.ts'; + +/** + * PortMap describes the mapping of container ports to host ports, using the container's port-number + * and protocol as key in the format `/`, for example, `80/udp`. + * + * If a container's port is mapped for multiple protocols, separate entries are added to the mapping + * table. + */ +export const PortMap = S.Record({ key: S.String, value: S.Array(PortBinding) }); +export type PortMap = S.Schema.Type; +export const PortMapEncoded = S.encodedSchema(PortMap); +export type PortMapEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/PortStatus.ts b/packages/effect-docker/src/gen/v1.53/PortStatus.ts new file mode 100644 index 0000000..2baa4a7 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/PortStatus.ts @@ -0,0 +1,12 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +import { EndpointPortConfig } from './EndpointPortConfig.ts'; + +/** Represents the port status of a task's host ports whose service has published host ports */ +export const PortStatus = S.Struct({ + Ports: S.optional(S.Array(EndpointPortConfig)), +}); +export type PortStatus = S.Schema.Type; +export const PortStatusEncoded = S.encodedSchema(PortStatus); +export type PortStatusEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/PortSummary.ts b/packages/effect-docker/src/gen/v1.53/PortSummary.ts new file mode 100644 index 0000000..6ef528c --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/PortSummary.ts @@ -0,0 +1,16 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +/** Describes a port-mapping between the container and the host. */ +export const PortSummary = S.Struct({ + /** Host IP address that the container's port is mapped to */ + IP: S.optional(S.String), + /** Port on the container */ + PrivatePort: pipe(S.Number, S.int()), + /** Port exposed on the host */ + PublicPort: S.optional(pipe(S.Number, S.int())), + Type: S.Literal('tcp', 'udp', 'sctp'), +}); +export type PortSummary = S.Schema.Type; +export const PortSummaryEncoded = S.encodedSchema(PortSummary); +export type PortSummaryEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/ProcessConfig.ts b/packages/effect-docker/src/gen/v1.53/ProcessConfig.ts new file mode 100644 index 0000000..e35fb73 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/ProcessConfig.ts @@ -0,0 +1,13 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +export const ProcessConfig = S.Struct({ + privileged: S.optional(S.Boolean), + user: S.optional(S.String), + tty: S.optional(S.Boolean), + entrypoint: S.optional(S.String), + arguments: S.optional(S.Array(S.String)), +}); +export type ProcessConfig = S.Schema.Type; +export const ProcessConfigEncoded = S.encodedSchema(ProcessConfig); +export type ProcessConfigEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/ProgressDetail.ts b/packages/effect-docker/src/gen/v1.53/ProgressDetail.ts new file mode 100644 index 0000000..4119856 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/ProgressDetail.ts @@ -0,0 +1,10 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +export const ProgressDetail = S.Struct({ + current: S.optional(pipe(S.Number, S.int())), + total: S.optional(pipe(S.Number, S.int())), +}); +export type ProgressDetail = S.Schema.Type; +export const ProgressDetailEncoded = S.encodedSchema(ProgressDetail); +export type ProgressDetailEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/PullIdentity.ts b/packages/effect-docker/src/gen/v1.53/PullIdentity.ts new file mode 100644 index 0000000..be6da51 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/PullIdentity.ts @@ -0,0 +1,14 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +/** + * PullIdentity contains remote location information if image was created via pull. If image was + * pulled via mirror, this contains the original repository location. + */ +export const PullIdentity = S.Struct({ + /** Repository is the remote repository location the image was pulled from. */ + Repository: S.optional(S.String), +}); +export type PullIdentity = S.Schema.Type; +export const PullIdentityEncoded = S.encodedSchema(PullIdentity); +export type PullIdentityEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/PushImageInfo.ts b/packages/effect-docker/src/gen/v1.53/PushImageInfo.ts new file mode 100644 index 0000000..6a114af --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/PushImageInfo.ts @@ -0,0 +1,14 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +import { ErrorDetail } from './ErrorDetail.ts'; +import { ProgressDetail } from './ProgressDetail.ts'; + +export const PushImageInfo = S.Struct({ + errorDetail: S.optional(ErrorDetail), + status: S.optional(S.String), + progressDetail: S.optional(ProgressDetail), +}); +export type PushImageInfo = S.Schema.Type; +export const PushImageInfoEncoded = S.encodedSchema(PushImageInfo); +export type PushImageInfoEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/Reachability.ts b/packages/effect-docker/src/gen/v1.53/Reachability.ts new file mode 100644 index 0000000..63af254 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/Reachability.ts @@ -0,0 +1,8 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +/** Reachability represents the reachability of a node. */ +export const Reachability = S.Literal('unknown', 'unreachable', 'reachable'); +export type Reachability = S.Schema.Type; +export const ReachabilityEncoded = S.encodedSchema(Reachability); +export type ReachabilityEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/RegistryServiceConfig.ts b/packages/effect-docker/src/gen/v1.53/RegistryServiceConfig.ts new file mode 100644 index 0000000..cf8cfb6 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/RegistryServiceConfig.ts @@ -0,0 +1,35 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +import { IndexInfo } from './IndexInfo.ts'; + +/** RegistryServiceConfig stores daemon registry services configuration. */ +export const RegistryServiceConfig = S.Struct({ + /** + * List of IP ranges of insecure registries, using the CIDR syntax ([RFC + * 4632](https://tools.ietf.org/html/4632)). Insecure registries accept un-encrypted (HTTP) and/or + * untrusted (HTTPS with certificates from unknown CAs) communication. + * + * By default, local registries (`::1/128` and `127.0.0.0/8`) are configured as insecure. All + * other registries are secure. Communicating with an insecure registry is not possible if the + * daemon assumes that registry is secure. + * + * This configuration override this behavior, insecure communication with registries whose + * resolved IP address is within the subnet described by the CIDR syntax. + * + * Registries can also be marked insecure by hostname. Those registries are listed under + * `IndexConfigs` and have their `Secure` field set to `false`. + * + * > **Warning**: Using this option can be useful when running a local registry, but introduces + * > security vulnerabilities. This option should therefore ONLY be used for testing purposes. For + * > increased security, users should add their CA to their system's list of trusted CAs instead of + * > enabling this option. + */ + InsecureRegistryCIDRs: S.optional(S.Array(S.String)), + IndexConfigs: S.optional(S.Record({ key: S.String, value: IndexInfo })), + /** List of registry URLs that act as a mirror for the official (`docker.io`) registry. */ + Mirrors: S.optional(S.Array(S.String)), +}); +export type RegistryServiceConfig = S.Schema.Type; +export const RegistryServiceConfigEncoded = S.encodedSchema(RegistryServiceConfig); +export type RegistryServiceConfigEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/ResourceObject.ts b/packages/effect-docker/src/gen/v1.53/ResourceObject.ts new file mode 100644 index 0000000..914218f --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/ResourceObject.ts @@ -0,0 +1,14 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +import { GenericResources } from './GenericResources.ts'; + +/** An object describing the resources which can be advertised by a node and requested by a task. */ +export const ResourceObject = S.Struct({ + NanoCPUs: S.optional(pipe(S.Number, S.int())), + MemoryBytes: S.optional(pipe(S.Number, S.int())), + GenericResources: S.optional(GenericResources), +}); +export type ResourceObject = S.Schema.Type; +export const ResourceObjectEncoded = S.encodedSchema(ResourceObject); +export type ResourceObjectEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/Resources.ts b/packages/effect-docker/src/gen/v1.53/Resources.ts new file mode 100644 index 0000000..2dc187e --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/Resources.ts @@ -0,0 +1,144 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +import { ThrottleDevice } from './ThrottleDevice.ts'; +import { DeviceMapping } from './DeviceMapping.ts'; +import { DeviceRequest } from './DeviceRequest.ts'; + +/** A container's resources (cgroups config, ulimits, etc) */ +export const Resources = S.Struct({ + /** An integer value representing this container's relative CPU weight versus other containers. */ + CpuShares: S.optional(pipe(S.Number, S.int())), + /** Memory limit in bytes. */ + Memory: S.optionalWith(pipe(S.Number, S.int()), { + default: () => 0, + }), + /** + * Path to `cgroups` under which the container's `cgroup` is created. If the path is not absolute, + * the path is considered to be relative to the `cgroups` path of the init process. Cgroups are + * created if they do not already exist. + */ + CgroupParent: S.optional(S.String), + /** Block IO weight (relative weight). */ + BlkioWeight: S.optional( + pipe(S.Number, S.int(), S.greaterThanOrEqualTo(0), S.lessThanOrEqualTo(1000)), + ), + /** + * Block IO weight (relative device weight) in the form: + * + * [{ Path: 'device_path', Weight: weight }]; + */ + BlkioWeightDevice: S.optional( + S.Array( + S.Struct({ + Path: S.optional(S.String), + Weight: S.optional(pipe(S.Number, S.int(), S.greaterThanOrEqualTo(0))), + }), + ), + ), + /** + * Limit read rate (bytes per second) from a device, in the form: + * + * [{ Path: 'device_path', Rate: rate }]; + */ + BlkioDeviceReadBps: S.optional(S.Array(ThrottleDevice)), + /** + * Limit write rate (bytes per second) to a device, in the form: + * + * [{ Path: 'device_path', Rate: rate }]; + */ + BlkioDeviceWriteBps: S.optional(S.Array(ThrottleDevice)), + /** + * Limit read rate (IO per second) from a device, in the form: + * + * [{ Path: 'device_path', Rate: rate }]; + */ + BlkioDeviceReadIOps: S.optional(S.Array(ThrottleDevice)), + /** + * Limit write rate (IO per second) to a device, in the form: + * + * [{ Path: 'device_path', Rate: rate }]; + */ + BlkioDeviceWriteIOps: S.optional(S.Array(ThrottleDevice)), + /** The length of a CPU period in microseconds. */ + CpuPeriod: S.optional(pipe(S.Number, S.int())), + /** Microseconds of CPU time that the container can get in a CPU period. */ + CpuQuota: S.optional(pipe(S.Number, S.int())), + /** + * The length of a CPU real-time period in microseconds. Set to 0 to allocate no time allocated to + * real-time tasks. + */ + CpuRealtimePeriod: S.optional(pipe(S.Number, S.int())), + /** + * The length of a CPU real-time runtime in microseconds. Set to 0 to allocate no time allocated + * to real-time tasks. + */ + CpuRealtimeRuntime: S.optional(pipe(S.Number, S.int())), + /** CPUs in which to allow execution (e.g., `0-3`, `0,1`). */ + CpusetCpus: S.optional(S.String), + /** Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems. */ + CpusetMems: S.optional(S.String), + /** A list of devices to add to the container. */ + Devices: S.optional(S.Array(DeviceMapping)), + /** A list of cgroup rules to apply to the container */ + DeviceCgroupRules: S.optional(S.Array(S.String)), + /** A list of requests for devices to be sent to device drivers. */ + DeviceRequests: S.optional(S.Array(DeviceRequest)), + /** Memory soft limit in bytes. */ + MemoryReservation: S.optional(pipe(S.Number, S.int())), + /** Total memory limit (memory + swap). Set as `-1` to enable unlimited swap. */ + MemorySwap: S.optional(pipe(S.Number, S.int())), + /** Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100. */ + MemorySwappiness: S.optional( + pipe(S.Number, S.int(), S.greaterThanOrEqualTo(0), S.lessThanOrEqualTo(100)), + ), + /** CPU quota in units of 10-9 CPUs. */ + NanoCpus: S.optional(pipe(S.Number, S.int())), + /** Disable OOM Killer for the container. */ + OomKillDisable: S.optional(S.Boolean), + /** + * Run an init inside the container that forwards signals and reaps processes. This field is + * omitted if empty, and the default (as configured on the daemon) is used. + */ + Init: S.optional(S.Boolean), + /** Tune a container's PIDs limit. Set `0` or `-1` for unlimited, or `null` to not change. */ + PidsLimit: S.optional(pipe(S.Number, S.int())), + /** + * A list of resource limits to set in the container. For example: + * + * { "Name": "nofile", "Soft": 1024, "Hard": 2048 } + */ + Ulimits: S.optional( + S.Array( + S.Struct({ + /** Name of ulimit */ + Name: S.optional(S.String), + /** Soft limit */ + Soft: S.optional(pipe(S.Number, S.int())), + /** Hard limit */ + Hard: S.optional(pipe(S.Number, S.int())), + }), + ), + ), + /** + * The number of usable CPUs (Windows only). + * + * On Windows Server containers, the processor resource controls are mutually exclusive. The order + * of precedence is `CPUCount` first, then `CPUShares`, and `CPUPercent` last. + */ + CpuCount: S.optional(pipe(S.Number, S.int())), + /** + * The usable percentage of the available CPUs (Windows only). + * + * On Windows Server containers, the processor resource controls are mutually exclusive. The order + * of precedence is `CPUCount` first, then `CPUShares`, and `CPUPercent` last. + */ + CpuPercent: S.optional(pipe(S.Number, S.int())), + /** Maximum IOps for the container system drive (Windows only) */ + IOMaximumIOps: S.optional(pipe(S.Number, S.int())), + /** Maximum IO in bytes per second for the container system drive (Windows only). */ + IOMaximumBandwidth: S.optional(pipe(S.Number, S.int())), +}); +export type Resources = S.Schema.Type; +export const ResourcesEncoded = S.encodedSchema(Resources); +export type ResourcesEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/RestartPolicy.ts b/packages/effect-docker/src/gen/v1.53/RestartPolicy.ts new file mode 100644 index 0000000..d6ba472 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/RestartPolicy.ts @@ -0,0 +1,25 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +/** + * The behavior to apply when the container exits. The default is not to restart. + * + * An ever increasing delay (double the previous delay, starting at 100ms) is added before each + * restart to prevent flooding the server. + */ +export const RestartPolicy = S.Struct({ + /** + * - Empty string means not to restart + * + * - `no` Do not automatically restart + * - `always` Always restart + * - `unless-stopped` Restart always except when the user has manually stopped the container + * - `on-failure` Restart only when the container exit code is non-zero + */ + Name: S.optional(S.Literal('', 'no', 'always', 'unless-stopped', 'on-failure')), + /** If `on-failure` is used, the number of times to retry before giving up. */ + MaximumRetryCount: S.optional(pipe(S.Number, S.int())), +}); +export type RestartPolicy = S.Schema.Type; +export const RestartPolicyEncoded = S.encodedSchema(RestartPolicy); +export type RestartPolicyEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/RootFSStorage.ts b/packages/effect-docker/src/gen/v1.53/RootFSStorage.ts new file mode 100644 index 0000000..4e4f0b7 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/RootFSStorage.ts @@ -0,0 +1,12 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +import { RootFSStorageSnapshot } from './RootFSStorageSnapshot.ts'; + +/** Information about the storage used for the container's root filesystem. */ +export const RootFSStorage = S.Struct({ + Snapshot: S.optional(RootFSStorageSnapshot), +}); +export type RootFSStorage = S.Schema.Type; +export const RootFSStorageEncoded = S.encodedSchema(RootFSStorage); +export type RootFSStorageEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/RootFSStorageSnapshot.ts b/packages/effect-docker/src/gen/v1.53/RootFSStorageSnapshot.ts new file mode 100644 index 0000000..8ea986c --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/RootFSStorageSnapshot.ts @@ -0,0 +1,11 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +/** Information about a snapshot backend of the container's root filesystem. */ +export const RootFSStorageSnapshot = S.Struct({ + /** Name of the snapshotter. */ + Name: S.optional(S.String), +}); +export type RootFSStorageSnapshot = S.Schema.Type; +export const RootFSStorageSnapshotEncoded = S.encodedSchema(RootFSStorageSnapshot); +export type RootFSStorageSnapshotEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/Runtime.ts b/packages/effect-docker/src/gen/v1.53/Runtime.ts new file mode 100644 index 0000000..f943e5f --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/Runtime.ts @@ -0,0 +1,37 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +/** + * Runtime describes an [OCI compliant](https://github.com/opencontainers/runtime-spec) runtime. + * + * The runtime is invoked by the daemon via the `containerd` daemon. OCI runtimes act as an + * interface to the Linux kernel namespaces, cgroups, and SELinux. + */ +export const Runtime = S.Struct({ + /** + * Name and, optional, path, of the OCI executable binary. + * + * If the path is omitted, the daemon searches the host's `$PATH` for the binary and uses the + * first result. + */ + path: S.optional(S.String), + /** List of command-line arguments to pass to the runtime when invoked. */ + runtimeArgs: S.optional(S.Array(S.String)), + /** + * Information specific to the runtime. + * + * While this API specification does not define data provided by runtimes, the following + * well-known properties may be provided by runtimes: + * + * `org.opencontainers.runtime-spec.features`: features structure as defined in the [OCI Runtime + * Specification](https://github.com/opencontainers/runtime-spec/blob/main/features.md), in a JSON + * string representation.


+ * + * > **Note**: The information returned in this field, including the formatting of values and + * > labels, should not be considered stable, and may change without notice. + */ + status: S.optional(S.Record({ key: S.String, value: S.String })), +}); +export type Runtime = S.Schema.Type; +export const RuntimeEncoded = S.encodedSchema(Runtime); +export type RuntimeEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/Secret.ts b/packages/effect-docker/src/gen/v1.53/Secret.ts new file mode 100644 index 0000000..a0aadaa --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/Secret.ts @@ -0,0 +1,16 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +import { ObjectVersion } from './ObjectVersion.ts'; +import { SecretSpec } from './SecretSpec.ts'; + +export const Secret = S.Struct({ + ID: S.optional(S.String), + Version: S.optional(ObjectVersion), + CreatedAt: S.optional(S.String), + UpdatedAt: S.optional(S.String), + Spec: S.optional(SecretSpec), +}); +export type Secret = S.Schema.Type; +export const SecretEncoded = S.encodedSchema(Secret); +export type SecretEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/SecretSpec.ts b/packages/effect-docker/src/gen/v1.53/SecretSpec.ts new file mode 100644 index 0000000..988dad8 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/SecretSpec.ts @@ -0,0 +1,26 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +import { Driver } from './Driver.ts'; + +export const SecretSpec = S.Struct({ + /** User-defined name of the secret. */ + Name: S.optional(S.String), + /** User-defined key/value metadata. */ + Labels: S.optional(S.Record({ key: S.String, value: S.String })), + /** + * Data is the data to store as a secret, formatted as a standard base64-encoded ([RFC + * 4648](https://tools.ietf.org/html/rfc4648#section-4)) string. It must be empty if the Driver + * field is set, in which case the data is loaded from an external secret store. The maximum + * allowed size is 500KB, as defined in + * [MaxSecretSize](https://pkg.go.dev/github.com/moby/swarmkit/v2@v2.0.0/api/validation#MaxSecretSize). + * + * This field is only used to _create_ a secret, and is not returned by other endpoints. + */ + Data: S.optional(S.String), + Driver: S.optional(Driver), + Templating: S.optional(Driver), +}); +export type SecretSpec = S.Schema.Type; +export const SecretSpecEncoded = S.encodedSchema(SecretSpec); +export type SecretSpecEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/Service.ts b/packages/effect-docker/src/gen/v1.53/Service.ts new file mode 100644 index 0000000..b9ee5f5 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/Service.ts @@ -0,0 +1,75 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +import { ObjectVersion } from './ObjectVersion.ts'; +import { ServiceSpec } from './ServiceSpec.ts'; +import { EndpointSpec } from './EndpointSpec.ts'; +import { EndpointPortConfig } from './EndpointPortConfig.ts'; + +export const Service = S.Struct({ + ID: S.optional(S.String), + Version: S.optional(ObjectVersion), + CreatedAt: S.optional(S.String), + UpdatedAt: S.optional(S.String), + Spec: S.optional(ServiceSpec), + Endpoint: S.optional( + S.Struct({ + Spec: S.optional(EndpointSpec), + Ports: S.optional(S.Array(EndpointPortConfig)), + VirtualIPs: S.optional( + S.Array( + S.Struct({ + NetworkID: S.optional(S.String), + Addr: S.optional(S.String), + }), + ), + ), + }), + ), + /** The status of a service update. */ + UpdateStatus: S.optional( + S.Struct({ + State: S.optional(S.Literal('updating', 'paused', 'completed')), + StartedAt: S.optional(S.String), + CompletedAt: S.optional(S.String), + Message: S.optional(S.String), + }), + ), + /** + * The status of the service's tasks. Provided only when requested as part of a ServiceList + * operation. + */ + ServiceStatus: S.optional( + S.Struct({ + /** The number of tasks for the service currently in the Running state. */ + RunningTasks: S.optional(pipe(S.Number, S.int())), + /** + * The number of tasks for the service desired to be running. For replicated services, this is + * the replica count from the service spec. For global services, this is computed by taking + * count of all tasks for the service with a Desired State other than Shutdown. + */ + DesiredTasks: S.optional(pipe(S.Number, S.int())), + /** + * The number of tasks for a job that are in the Completed state. This field must be + * cross-referenced with the service type, as the value of 0 may mean the service is not in a + * job mode, or it may mean the job-mode service has no tasks yet Completed. + */ + CompletedTasks: S.optional(pipe(S.Number, S.int())), + }), + ), + /** + * The status of the service when it is in one of ReplicatedJob or GlobalJob modes. Absent on + * Replicated and Global mode services. The JobIteration is an ObjectVersion, but unlike the + * Service's version, does not need to be sent with an update request. + */ + JobStatus: S.optional( + S.Struct({ + JobIteration: S.optional(ObjectVersion), + /** The last time, as observed by the server, that this job was started. */ + LastExecution: S.optional(S.String), + }), + ), +}); +export type Service = S.Schema.Type; +export const ServiceEncoded = S.encodedSchema(Service); +export type ServiceEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/ServiceCreateResponse.ts b/packages/effect-docker/src/gen/v1.53/ServiceCreateResponse.ts new file mode 100644 index 0000000..2db782c --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/ServiceCreateResponse.ts @@ -0,0 +1,17 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +/** Contains the information returned to a client on the creation of a new service. */ +export const ServiceCreateResponse = S.Struct({ + /** The ID of the created service. */ + ID: S.optional(S.String), + /** + * Optional warning message. + * + * FIXME(thaJeztah): this should have "omitempty" in the generated type. + */ + Warnings: S.optional(S.Array(S.String)), +}); +export type ServiceCreateResponse = S.Schema.Type; +export const ServiceCreateResponseEncoded = S.encodedSchema(ServiceCreateResponse); +export type ServiceCreateResponseEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/ServiceInfo.ts b/packages/effect-docker/src/gen/v1.53/ServiceInfo.ts new file mode 100644 index 0000000..662f063 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/ServiceInfo.ts @@ -0,0 +1,15 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +import { NetworkTaskInfo } from './NetworkTaskInfo.ts'; + +/** Represents service parameters with the list of service's tasks */ +export const ServiceInfo = S.Struct({ + VIP: S.optional(S.String), + Ports: S.optional(S.Array(S.String)), + LocalLBIndex: S.optional(pipe(S.Number, S.int())), + Tasks: S.optional(S.Array(NetworkTaskInfo)), +}); +export type ServiceInfo = S.Schema.Type; +export const ServiceInfoEncoded = S.encodedSchema(ServiceInfo); +export type ServiceInfoEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/ServiceSpec.ts b/packages/effect-docker/src/gen/v1.53/ServiceSpec.ts new file mode 100644 index 0000000..6a812df --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/ServiceSpec.ts @@ -0,0 +1,99 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +import { TaskSpec } from './TaskSpec.ts'; +import { NetworkAttachmentConfig } from './NetworkAttachmentConfig.ts'; +import { EndpointSpec } from './EndpointSpec.ts'; + +/** User modifiable configuration for a service. */ +export const ServiceSpec = S.Struct({ + /** Name of the service. */ + Name: S.optional(S.String), + /** User-defined key/value metadata. */ + Labels: S.optional(S.Record({ key: S.String, value: S.String })), + TaskTemplate: S.optional(TaskSpec), + /** Scheduling mode for the service. */ + Mode: S.optional( + S.Struct({ + Replicated: S.optional( + S.Struct({ + Replicas: S.optional(pipe(S.Number, S.int())), + }), + ), + Global: S.optional(S.Struct({})), + /** The mode used for services with a finite number of tasks that run to a completed state. */ + ReplicatedJob: S.optional( + S.Struct({ + /** The maximum number of replicas to run simultaneously. */ + MaxConcurrent: S.optionalWith(pipe(S.Number, S.int()), { + default: () => 1, + }), + /** + * The total number of replicas desired to reach the Completed state. If unset, will default + * to the value of `MaxConcurrent` + */ + TotalCompletions: S.optional(pipe(S.Number, S.int())), + }), + ), + /** The mode used for services which run a task to the completed state on each valid node. */ + GlobalJob: S.optional(S.Struct({})), + }), + ), + /** Specification for the update strategy of the service. */ + UpdateConfig: S.optional( + S.Struct({ + /** Maximum number of tasks to be updated in one iteration (0 means unlimited parallelism). */ + Parallelism: S.optional(pipe(S.Number, S.int())), + /** Amount of time between updates, in nanoseconds. */ + Delay: S.optional(pipe(S.Number, S.int())), + /** Action to take if an updated task fails to run, or stops running during the update. */ + FailureAction: S.optional(S.Literal('continue', 'pause', 'rollback')), + /** Amount of time to monitor each updated task for failures, in nanoseconds. */ + Monitor: S.optional(pipe(S.Number, S.int())), + /** + * The fraction of tasks that may fail during an update before the failure action is invoked, + * specified as a floating point number between 0 and 1. + */ + MaxFailureRatio: S.optional(S.Number), + /** + * The order of operations when rolling out an updated task. Either the old task is shut down + * before the new task is started, or the new task is started before the old task is shut down. + */ + Order: S.optional(S.Literal('stop-first', 'start-first')), + }), + ), + /** Specification for the rollback strategy of the service. */ + RollbackConfig: S.optional( + S.Struct({ + /** Maximum number of tasks to be rolled back in one iteration (0 means unlimited parallelism). */ + Parallelism: S.optional(pipe(S.Number, S.int())), + /** Amount of time between rollback iterations, in nanoseconds. */ + Delay: S.optional(pipe(S.Number, S.int())), + /** Action to take if an rolled back task fails to run, or stops running during the rollback. */ + FailureAction: S.optional(S.Literal('continue', 'pause')), + /** Amount of time to monitor each rolled back task for failures, in nanoseconds. */ + Monitor: S.optional(pipe(S.Number, S.int())), + /** + * The fraction of tasks that may fail during a rollback before the failure action is invoked, + * specified as a floating point number between 0 and 1. + */ + MaxFailureRatio: S.optional(S.Number), + /** + * The order of operations when rolling back a task. Either the old task is shut down before the + * new task is started, or the new task is started before the old task is shut down. + */ + Order: S.optional(S.Literal('stop-first', 'start-first')), + }), + ), + /** + * Specifies which networks the service should attach to. + * + * Deprecated: This field is deprecated since v1.44. The Networks field in TaskSpec should be used + * instead. + */ + Networks: S.optional(S.Array(NetworkAttachmentConfig)), + EndpointSpec: S.optional(EndpointSpec), +}); +export type ServiceSpec = S.Schema.Type; +export const ServiceSpecEncoded = S.encodedSchema(ServiceSpec); +export type ServiceSpecEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/ServiceUpdateResponse.ts b/packages/effect-docker/src/gen/v1.53/ServiceUpdateResponse.ts new file mode 100644 index 0000000..0217158 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/ServiceUpdateResponse.ts @@ -0,0 +1,10 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +export const ServiceUpdateResponse = S.Struct({ + /** Optional warning messages */ + Warnings: S.optional(S.Array(S.String)), +}); +export type ServiceUpdateResponse = S.Schema.Type; +export const ServiceUpdateResponseEncoded = S.encodedSchema(ServiceUpdateResponse); +export type ServiceUpdateResponseEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/SignatureIdentity.ts b/packages/effect-docker/src/gen/v1.53/SignatureIdentity.ts new file mode 100644 index 0000000..2a5fe01 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/SignatureIdentity.ts @@ -0,0 +1,37 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +import { SignatureTimestamp } from './SignatureTimestamp.ts'; +import { KnownSignerIdentity } from './KnownSignerIdentity.ts'; +import { SignerIdentity } from './SignerIdentity.ts'; +import { SignatureType } from './SignatureType.ts'; + +/** SignatureIdentity contains the properties of verified signatures for the image. */ +export const SignatureIdentity = S.Struct({ + /** Name is a textual description summarizing the type of signature. */ + Name: S.optional(S.String), + /** Timestamps contains a list of verified signed timestamps for the signature. */ + Timestamps: S.optional(S.Array(SignatureTimestamp)), + KnownSigner: S.optional(KnownSignerIdentity), + /** + * DockerReference is the Docker image reference associated with the signature. This is an + * optional field only present in older hashedrecord signatures. + */ + DockerReference: S.optional(S.String), + Signer: S.optional(SignerIdentity), + SignatureType: S.optional(SignatureType), + /** + * Error contains error information if signature verification failed. Other fields will be empty + * in this case. + */ + Error: S.optional(S.String), + /** + * Warnings contains any warnings that occurred during signature verification. For example, if + * there was no internet connectivity and cached trust roots were used. Warning does not indicate + * a failed verification but may point to configuration issues. + */ + Warnings: S.optional(S.Array(S.String)), +}); +export type SignatureIdentity = S.Schema.Type; +export const SignatureIdentityEncoded = S.encodedSchema(SignatureIdentity); +export type SignatureIdentityEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/SignatureTimestamp.ts b/packages/effect-docker/src/gen/v1.53/SignatureTimestamp.ts new file mode 100644 index 0000000..5a6eb83 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/SignatureTimestamp.ts @@ -0,0 +1,14 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +import { SignatureTimestampType } from './SignatureTimestampType.ts'; + +/** SignatureTimestamp contains information about a verified signed timestamp for an image signature. */ +export const SignatureTimestamp = S.Struct({ + Type: S.optional(SignatureTimestampType), + URI: S.optional(S.String), + Timestamp: S.optional(S.Date), +}); +export type SignatureTimestamp = S.Schema.Type; +export const SignatureTimestampEncoded = S.encodedSchema(SignatureTimestamp); +export type SignatureTimestampEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/SignatureTimestampType.ts b/packages/effect-docker/src/gen/v1.53/SignatureTimestampType.ts new file mode 100644 index 0000000..90bfc6b --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/SignatureTimestampType.ts @@ -0,0 +1,8 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +/** SignatureTimestampType is the type of timestamp used in the signature. */ +export const SignatureTimestampType = S.Literal('Tlog', 'TimestampAuthority'); +export type SignatureTimestampType = S.Schema.Type; +export const SignatureTimestampTypeEncoded = S.encodedSchema(SignatureTimestampType); +export type SignatureTimestampTypeEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/SignatureType.ts b/packages/effect-docker/src/gen/v1.53/SignatureType.ts new file mode 100644 index 0000000..388253d --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/SignatureType.ts @@ -0,0 +1,8 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +/** SignatureType is the type of signature format. */ +export const SignatureType = S.Literal('bundle-v0.3', 'simplesigning-v1'); +export type SignatureType = S.Schema.Type; +export const SignatureTypeEncoded = S.encodedSchema(SignatureType); +export type SignatureTypeEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/SignerIdentity.ts b/packages/effect-docker/src/gen/v1.53/SignerIdentity.ts new file mode 100644 index 0000000..d62152e --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/SignerIdentity.ts @@ -0,0 +1,53 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +/** SignerIdentity contains information about the signer certificate used to sign the image. */ +export const SignerIdentity = S.Struct({ + /** CertificateIssuer is the certificate issuer. */ + CertificateIssuer: S.optional(S.String), + /** SubjectAlternativeName is the certificate subject alternative name. */ + SubjectAlternativeName: S.optional(S.String), + /** + * The OIDC issuer. Should match `iss` claim of ID token or, in the case of a federated login like + * Dex it should match the issuer URL of the upstream issuer. The issuer is not set the extensions + * are invalid and will fail to render. + */ + Issuer: S.optional(S.String), + /** Reference to specific build instructions that are responsible for signing. */ + BuildSignerURI: S.optional(S.String), + /** + * Immutable reference to the specific version of the build instructions that is responsible for + * signing. + */ + BuildSignerDigest: S.optional(S.String), + /** + * Specifies whether the build took place in platform-hosted cloud infrastructure or + * customer/self-hosted infrastructure. + */ + RunnerEnvironment: S.optional(S.String), + /** Source repository URL that the build was based on. */ + SourceRepositoryURI: S.optional(S.String), + /** Immutable reference to a specific version of the source code that the build was based upon. */ + SourceRepositoryDigest: S.optional(S.String), + /** Source Repository Ref that the build run was based upon. */ + SourceRepositoryRef: S.optional(S.String), + /** Immutable identifier for the source repository the workflow was based upon. */ + SourceRepositoryIdentifier: S.optional(S.String), + /** Source repository owner URL of the owner of the source repository that the build was based on. */ + SourceRepositoryOwnerURI: S.optional(S.String), + /** Immutable identifier for the owner of the source repository that the workflow was based upon. */ + SourceRepositoryOwnerIdentifier: S.optional(S.String), + /** Build Config URL to the top-level/initiating build instructions. */ + BuildConfigURI: S.optional(S.String), + /** Immutable reference to the specific version of the top-level/initiating build instructions. */ + BuildConfigDigest: S.optional(S.String), + /** Event or action that initiated the build. */ + BuildTrigger: S.optional(S.String), + /** Run Invocation URL to uniquely identify the build execution. */ + RunInvocationURI: S.optional(S.String), + /** Source repository visibility at the time of signing the certificate. */ + SourceRepositoryVisibilityAtSigning: S.optional(S.String), +}); +export type SignerIdentity = S.Schema.Type; +export const SignerIdentityEncoded = S.encodedSchema(SignerIdentity); +export type SignerIdentityEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/Storage.ts b/packages/effect-docker/src/gen/v1.53/Storage.ts new file mode 100644 index 0000000..7d33e3a --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/Storage.ts @@ -0,0 +1,12 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +import { RootFSStorage } from './RootFSStorage.ts'; + +/** Information about the storage used by the container. */ +export const Storage = S.Struct({ + RootFS: S.optional(RootFSStorage), +}); +export type Storage = S.Schema.Type; +export const StorageEncoded = S.encodedSchema(Storage); +export type StorageEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/SubnetStatus.ts b/packages/effect-docker/src/gen/v1.53/SubnetStatus.ts new file mode 100644 index 0000000..9668e82 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/SubnetStatus.ts @@ -0,0 +1,18 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +export const SubnetStatus = S.Struct({ + /** + * Number of IP addresses in the subnet that are in use or reserved and are therefore unavailable + * for allocation, saturating at 264 - 1. + */ + IPsInUse: S.optional(pipe(S.Number, S.int())), + /** + * Number of IP addresses within the network's IPRange for the subnet that are available for + * allocation, saturating at 264 - 1. + */ + DynamicIPsAvailable: S.optional(pipe(S.Number, S.int())), +}); +export type SubnetStatus = S.Schema.Type; +export const SubnetStatusEncoded = S.encodedSchema(SubnetStatus); +export type SubnetStatusEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/SwarmInfo.ts b/packages/effect-docker/src/gen/v1.53/SwarmInfo.ts new file mode 100644 index 0000000..156e568 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/SwarmInfo.ts @@ -0,0 +1,35 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +import { LocalNodeState } from './LocalNodeState.ts'; +import { PeerNode } from './PeerNode.ts'; +import { ClusterInfo } from './ClusterInfo.ts'; + +/** Represents generic information about swarm. */ +export const SwarmInfo = S.Struct({ + /** Unique identifier of for this node in the swarm. */ + NodeID: S.optionalWith(S.String, { + default: () => '', + }), + /** IP address at which this node can be reached by other nodes in the swarm. */ + NodeAddr: S.optionalWith(S.String, { + default: () => '', + }), + LocalNodeState: S.optional(LocalNodeState), + ControlAvailable: S.optionalWith(S.Boolean, { + default: () => false, + }), + Error: S.optionalWith(S.String, { + default: () => '', + }), + /** List of ID's and addresses of other managers in the swarm. */ + RemoteManagers: S.optional(S.Array(PeerNode)), + /** Total number of nodes in the swarm. */ + Nodes: S.optional(pipe(S.Number, S.int())), + /** Total number of managers in the swarm. */ + Managers: S.optional(pipe(S.Number, S.int())), + Cluster: S.optional(ClusterInfo), +}); +export type SwarmInfo = S.Schema.Type; +export const SwarmInfoEncoded = S.encodedSchema(SwarmInfo); +export type SwarmInfoEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/SwarmSpec.ts b/packages/effect-docker/src/gen/v1.53/SwarmSpec.ts new file mode 100644 index 0000000..84550d9 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/SwarmSpec.ts @@ -0,0 +1,125 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +/** User modifiable swarm configuration. */ +export const SwarmSpec = S.Struct({ + /** Name of the swarm. */ + Name: S.optional(S.String), + /** User-defined key/value metadata. */ + Labels: S.optional(S.Record({ key: S.String, value: S.String })), + /** Orchestration configuration. */ + Orchestration: S.optional( + S.Struct({ + /** + * The number of historic tasks to keep per instance or node. If negative, never remove + * completed or failed tasks. + */ + TaskHistoryRetentionLimit: S.optional(pipe(S.Number, S.int())), + }), + ), + /** Raft configuration. */ + Raft: S.optional( + S.Struct({ + /** The number of log entries between snapshots. */ + SnapshotInterval: S.optional(pipe(S.Number, S.int())), + /** The number of snapshots to keep beyond the current snapshot. */ + KeepOldSnapshots: S.optional(pipe(S.Number, S.int())), + /** + * The number of log entries to keep around to sync up slow followers after a snapshot is + * created. + */ + LogEntriesForSlowFollowers: S.optional(pipe(S.Number, S.int())), + /** + * The number of ticks that a follower will wait for a message from the leader before becoming a + * candidate and starting an election. `ElectionTick` must be greater than `HeartbeatTick`. + * + * A tick currently defaults to one second, so these translate + * directly to seconds currently, but this is NOT guaranteed. + */ + ElectionTick: S.optional(pipe(S.Number, S.int())), + /** + * The number of ticks between heartbeats. Every HeartbeatTick ticks, the leader will send a + * heartbeat to the followers. + * + * A tick currently defaults to one second, so these translate + * directly to seconds currently, but this is NOT guaranteed. + */ + HeartbeatTick: S.optional(pipe(S.Number, S.int())), + }), + ), + /** Dispatcher configuration. */ + Dispatcher: S.optional( + S.Struct({ + /** The delay for an agent to send a heartbeat to the dispatcher. */ + HeartbeatPeriod: S.optional(pipe(S.Number, S.int())), + }), + ), + /** CA configuration. */ + CAConfig: S.optional( + S.Struct({ + /** The duration node certificates are issued for. */ + NodeCertExpiry: S.optional(pipe(S.Number, S.int())), + /** Configuration for forwarding signing requests to an external certificate authority. */ + ExternalCAs: S.optional( + S.Array( + S.Struct({ + /** Protocol for communication with the external CA (currently only `cfssl` is supported). */ + Protocol: S.optionalWith(S.Literal('cfssl'), { + default: () => 'cfssl', + }), + /** URL where certificate signing requests should be sent. */ + URL: S.optional(S.String), + /** + * An object with key/value pairs that are interpreted as protocol-specific options for the + * external CA driver. + */ + Options: S.optional(S.Record({ key: S.String, value: S.String })), + /** + * The root CA certificate (in PEM format) this external CA uses to issue TLS certificates + * (assumed to be to the current swarm root CA certificate if not provided). + */ + CACert: S.optional(S.String), + }), + ), + ), + /** The desired signing CA certificate for all swarm node TLS leaf certificates, in PEM format. */ + SigningCACert: S.optional(S.String), + /** The desired signing CA key for all swarm node TLS leaf certificates, in PEM format. */ + SigningCAKey: S.optional(S.String), + /** + * An integer whose purpose is to force swarm to generate a new signing CA certificate and key, + * if none have been specified in `SigningCACert` and `SigningCAKey` + */ + ForceRotate: S.optional(pipe(S.Number, S.int())), + }), + ), + /** Parameters related to encryption-at-rest. */ + EncryptionConfig: S.optional( + S.Struct({ + /** If set, generate a key and use it to lock data stored on the managers. */ + AutoLockManagers: S.optional(S.Boolean), + }), + ), + /** Defaults for creating tasks in this cluster. */ + TaskDefaults: S.optional( + S.Struct({ + /** + * The log driver to use for tasks created in the orchestrator if unspecified by a service. + * + * Updating this value only affects new tasks. Existing tasks continue + * to use their previously configured log driver until recreated. + */ + LogDriver: S.optional( + S.Struct({ + /** The log driver to use as a default for new tasks. */ + Name: S.optional(S.String), + /** Driver-specific options for the selected log driver, specified as key/value pairs. */ + Options: S.optional(S.Record({ key: S.String, value: S.String })), + }), + ), + }), + ), +}); +export type SwarmSpec = S.Schema.Type; +export const SwarmSpecEncoded = S.encodedSchema(SwarmSpec); +export type SwarmSpecEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/SystemInfo.ts b/packages/effect-docker/src/gen/v1.53/SystemInfo.ts new file mode 100644 index 0000000..cada3a1 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/SystemInfo.ts @@ -0,0 +1,322 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +import { PluginsInfo } from './PluginsInfo.ts'; +import { RegistryServiceConfig } from './RegistryServiceConfig.ts'; +import { GenericResources } from './GenericResources.ts'; +import { Runtime } from './Runtime.ts'; +import { SwarmInfo } from './SwarmInfo.ts'; +import { Commit } from './Commit.ts'; +import { FirewallInfo } from './FirewallInfo.ts'; +import { DeviceInfo } from './DeviceInfo.ts'; +import { NRIInfo } from './NRIInfo.ts'; +import { ContainerdInfo } from './ContainerdInfo.ts'; + +export const SystemInfo = S.Struct({ + /** + * Unique identifier of the daemon.


+ * + * > **Note**: The format of the ID itself is not part of the API, and should not be considered + * > stable. + */ + ID: S.optional(S.String), + /** Total number of containers on the host. */ + Containers: S.optional(pipe(S.Number, S.int())), + /** Number of containers with status `"running"`. */ + ContainersRunning: S.optional(pipe(S.Number, S.int())), + /** Number of containers with status `"paused"`. */ + ContainersPaused: S.optional(pipe(S.Number, S.int())), + /** Number of containers with status `"stopped"`. */ + ContainersStopped: S.optional(pipe(S.Number, S.int())), + /** + * Total number of images on the host. + * + * Both _tagged_ and _untagged_ (dangling) images are counted. + */ + Images: S.optional(pipe(S.Number, S.int())), + /** Name of the storage driver in use. */ + Driver: S.optional(S.String), + /** + * Information specific to the storage driver, provided as "label" / "value" pairs. + * + * This information is provided by the storage driver, and formatted in a way consistent with the + * output of `docker info` on the command line.


+ * + * > **Note**: The information returned in this field, including the formatting of values and + * > labels, should not be considered stable, and may change without notice. + */ + DriverStatus: S.optional(S.Array(S.Array(S.String))), + /** + * Root directory of persistent Docker state. + * + * Defaults to `/var/lib/docker` on Linux, and `C:\ProgramData\docker` on Windows. + */ + DockerRootDir: S.optional(S.String), + Plugins: S.optional(PluginsInfo), + /** Indicates if the host has memory limit support enabled. */ + MemoryLimit: S.optional(S.Boolean), + /** Indicates if the host has memory swap limit support enabled. */ + SwapLimit: S.optional(S.Boolean), + /** Indicates if CPU CFS(Completely Fair Scheduler) period is supported by the host. */ + CpuCfsPeriod: S.optional(S.Boolean), + /** Indicates if CPU CFS(Completely Fair Scheduler) quota is supported by the host. */ + CpuCfsQuota: S.optional(S.Boolean), + /** Indicates if CPU Shares limiting is supported by the host. */ + CPUShares: S.optional(S.Boolean), + /** + * Indicates if CPUsets (cpuset.cpus, cpuset.mems) are supported by the host. + * + * See [cpuset(7)](https://www.kernel.org/doc/Documentation/cgroup-v1/cpusets.txt) + */ + CPUSet: S.optional(S.Boolean), + /** Indicates if the host kernel has PID limit support enabled. */ + PidsLimit: S.optional(S.Boolean), + /** Indicates if OOM killer disable is supported on the host. */ + OomKillDisable: S.optional(S.Boolean), + /** Indicates IPv4 forwarding is enabled. */ + IPv4Forwarding: S.optional(S.Boolean), + /** Indicates if the daemon is running in debug-mode / with debug-level logging enabled. */ + Debug: S.optional(S.Boolean), + /** + * The total number of file Descriptors in use by the daemon process. + * + * This information is only returned if debug-mode is enabled. + */ + NFd: S.optional(pipe(S.Number, S.int())), + /** + * The number of goroutines that currently exist. + * + * This information is only returned if debug-mode is enabled. + */ + NGoroutines: S.optional(pipe(S.Number, S.int())), + /** + * Current system-time in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with + * nano-seconds. + */ + SystemTime: S.optional(S.String), + /** The logging driver to use as a default for new containers. */ + LoggingDriver: S.optional(S.String), + /** The driver to use for managing cgroups. */ + CgroupDriver: S.optionalWith(S.Literal('cgroupfs', 'systemd', 'none'), { + default: () => 'cgroupfs', + }), + /** The version of the cgroup. */ + CgroupVersion: S.optionalWith(S.Literal('1', '2'), { + default: () => '1', + }), + /** Number of event listeners subscribed. */ + NEventsListener: S.optional(pipe(S.Number, S.int())), + /** + * Kernel version of the host. + * + * On Linux, this information obtained from `uname`. On Windows this information is queried from + * the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ registry value, + * for example _"10.0 14393 (14393.1198.amd64fre.rs1_release_sec.170427-1353)"_. + */ + KernelVersion: S.optional(S.String), + /** + * Name of the host's operating system, for example: "Ubuntu 24.04 LTS" or "Windows Server 2016 + * Datacenter" + */ + OperatingSystem: S.optional(S.String), + /** + * Version of the host's operating system


+ * + * > **Note**: The information returned in this field, including its very existence, and the + * > formatting of values, should not be considered stable, and may change without notice. + */ + OSVersion: S.optional(S.String), + /** + * Generic type of the operating system of the host, as returned by the Go runtime (`GOOS`). + * + * Currently returned values are "linux" and "windows". A full list of possible values can be + * found in the [Go documentation](https://go.dev/doc/install/source#environment). + */ + OSType: S.optional(S.String), + /** + * Hardware architecture of the host, as returned by the operating system. This is equivalent to + * the output of `uname -m` on Linux. + * + * Unlike `Arch` (from `/version`), this reports the machine's native architecture, which can + * differ from the Go runtime architecture when running a binary compiled for a different + * architecture (for example, a 32-bit binary running on 64-bit hardware). + */ + Architecture: S.optional(S.String), + /** + * The number of logical CPUs usable by the daemon. + * + * The number of available CPUs is checked by querying the operating system when the daemon + * starts. Changes to operating system CPU allocation after the daemon is started are not + * reflected. + */ + NCPU: S.optional(pipe(S.Number, S.int())), + /** Total amount of physical memory available on the host, in bytes. */ + MemTotal: S.optional(pipe(S.Number, S.int())), + /** + * Address / URL of the index server that is used for image search, and as a default for user + * authentication for Docker Hub and Docker Cloud. + */ + IndexServerAddress: S.optionalWith(S.String, { + default: () => 'https://index.docker.io/v1/', + }), + RegistryConfig: S.optional(RegistryServiceConfig), + GenericResources: S.optional(GenericResources), + /** + * HTTP-proxy configured for the daemon. This value is obtained from the + * [`HTTP_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) environment + * variable. Credentials ([user info + * component](https://tools.ietf.org/html/rfc3986#section-3.2.1)) in the proxy URL are masked in + * the API response. + * + * Containers do not automatically inherit this configuration. + */ + HttpProxy: S.optional(S.String), + /** + * HTTPS-proxy configured for the daemon. This value is obtained from the + * [`HTTPS_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) environment + * variable. Credentials ([user info + * component](https://tools.ietf.org/html/rfc3986#section-3.2.1)) in the proxy URL are masked in + * the API response. + * + * Containers do not automatically inherit this configuration. + */ + HttpsProxy: S.optional(S.String), + /** + * Comma-separated list of domain extensions for which no proxy should be used. This value is + * obtained from the [`NO_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) + * environment variable. + * + * Containers do not automatically inherit this configuration. + */ + NoProxy: S.optional(S.String), + /** Hostname of the host. */ + Name: S.optional(S.String), + /** + * User-defined labels (key/value metadata) as set on the daemon.


+ * + * > **Note**: When part of a Swarm, nodes can both have _daemon_ labels, set through the daemon + * > configuration, and _node_ labels, set from a manager node in the Swarm. Node labels are not + * > included in this field. Node labels can be retrieved using the `/nodes/(id)` endpoint on a + * > manager node in the Swarm. + */ + Labels: S.optional(S.Array(S.String)), + /** Indicates if experimental features are enabled on the daemon. */ + ExperimentalBuild: S.optional(S.Boolean), + /** Version string of the daemon. */ + ServerVersion: S.optional(S.String), + /** + * List of [OCI compliant](https://github.com/opencontainers/runtime-spec) runtimes configured on + * the daemon. Keys hold the "name" used to reference the runtime. + * + * The Docker daemon relies on an OCI compliant runtime (invoked via the `containerd` daemon) as + * its interface to the Linux kernel namespaces, cgroups, and SELinux. + * + * The default runtime is `runc`, and automatically configured. Additional runtimes can be + * configured by the user and will be listed here. + */ + Runtimes: S.optional(S.Record({ key: S.String, value: Runtime })), + /** + * Name of the default OCI runtime that is used when starting containers. + * + * The default can be overridden per-container at create time. + */ + DefaultRuntime: S.optionalWith(S.String, { + default: () => 'runc', + }), + Swarm: S.optional(SwarmInfo), + /** + * Indicates if live restore is enabled. + * + * If enabled, containers are kept running when the daemon is shutdown or upon daemon start if + * running containers are detected. + */ + LiveRestoreEnabled: S.optionalWith(S.Boolean, { + default: () => false, + }), + /** + * Represents the isolation technology to use as a default for containers. The supported values + * are platform-specific. + * + * If no isolation value is specified on daemon start, on Windows client, the default is `hyperv`, + * and on Windows server, the default is `process`. + * + * This option is currently not used on other platforms. + */ + Isolation: S.optionalWith(S.Literal('default', 'hyperv', 'process', ''), { + default: () => 'default', + }), + /** + * Name and, optional, path of the `docker-init` binary. + * + * If the path is omitted, the daemon searches the host's `$PATH` for the binary and uses the + * first result. + */ + InitBinary: S.optional(S.String), + ContainerdCommit: S.optional(Commit), + RuncCommit: S.optional(Commit), + InitCommit: S.optional(Commit), + /** + * List of security features that are enabled on the daemon, such as apparmor, seccomp, SELinux, + * user-namespaces (userns), rootless and no-new-privileges. + * + * Additional configuration options for each security feature may be present, and are included as + * a comma-separated list of key/value pairs. + */ + SecurityOptions: S.optional(S.Array(S.String)), + /** + * Reports a summary of the product license on the daemon. + * + * If a commercial license has been applied to the daemon, information such as number of nodes, + * and expiration are included. + */ + ProductLicense: S.optional(S.String), + /** + * List of custom default address pools for local networks, which can be specified in the + * daemon.json file or dockerd option. + * + * Example: a Base "10.10.0.0/16" with Size 24 will define the set of 256 10.10.[0-255].0/24 + * address pools. + */ + DefaultAddressPools: S.optional( + S.Array( + S.Struct({ + /** The network address in CIDR format */ + Base: S.optional(S.String), + /** The network pool size */ + Size: S.optional(pipe(S.Number, S.int())), + }), + ), + ), + FirewallBackend: S.optional(FirewallInfo), + /** + * List of devices discovered by device drivers. + * + * Each device includes information about its source driver, kind, name, and additional + * driver-specific attributes. + */ + DiscoveredDevices: S.optional(S.Array(DeviceInfo)), + NRI: S.optional(NRIInfo), + /** + * List of warnings / informational messages about missing features, or issues related to the + * daemon configuration. + * + * These messages can be printed by the client as information to the user. + */ + Warnings: S.optional(S.Array(S.String)), + /** + * List of directories where (Container Device Interface) CDI specifications are located. + * + * These specifications define vendor-specific modifications to an OCI runtime specification for a + * container being created. + * + * An empty list indicates that CDI device injection is disabled. + * + * Note that since using CDI device injection requires the daemon to have experimental enabled. + * For non-experimental daemons an empty list will always be returned. + */ + CDISpecDirs: S.optional(S.Array(S.String)), + Containerd: S.optional(ContainerdInfo), +}); +export type SystemInfo = S.Schema.Type; +export const SystemInfoEncoded = S.encodedSchema(SystemInfo); +export type SystemInfoEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/SystemVersion.ts b/packages/effect-docker/src/gen/v1.53/SystemVersion.ts new file mode 100644 index 0000000..7535575 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/SystemVersion.ts @@ -0,0 +1,66 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +/** Response of Engine API: GET "/version" */ +export const SystemVersion = S.Struct({ + Platform: S.optional( + S.Struct({ + Name: S.String, + }), + ), + /** Information about system components */ + Components: S.optional( + S.Array( + S.Struct({ + /** Name of the component */ + Name: S.String, + /** Version of the component */ + Version: S.String, + /** + * Key/value pairs of strings with additional information about the component. These values are + * intended for informational purposes only, and their content is not defined, and not part of + * the API specification. + * + * These messages can be printed by the client as information to the user. + */ + Details: S.optional(S.Struct({})), + }), + ), + ), + /** The version of the daemon */ + Version: S.optional(S.String), + /** The default (and highest) API version that is supported by the daemon */ + ApiVersion: S.optional(S.String), + /** The minimum API version that is supported by the daemon */ + MinAPIVersion: S.optional(S.String), + /** The Git commit of the source code that was used to build the daemon */ + GitCommit: S.optional(S.String), + /** The version Go used to compile the daemon, and the version of the Go runtime in use. */ + GoVersion: S.optional(S.String), + /** The operating system that the daemon is running on ("linux" or "windows") */ + Os: S.optional(S.String), + /** + * Architecture of the daemon, as returned by the Go runtime (`GOARCH`). + * + * A full list of possible values can be found in the [Go + * documentation](https://go.dev/doc/install/source#environment). + */ + Arch: S.optional(S.String), + /** + * The kernel version (`uname -r`) that the daemon is running on. + * + * This field is omitted when empty. + */ + KernelVersion: S.optional(S.String), + /** + * Indicates if the daemon is started with experimental features enabled. + * + * This field is omitted when empty / false. + */ + Experimental: S.optional(S.Boolean), + /** The date and time that the daemon was compiled. */ + BuildTime: S.optional(S.String), +}); +export type SystemVersion = S.Schema.Type; +export const SystemVersionEncoded = S.encodedSchema(SystemVersion); +export type SystemVersionEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/TLSInfo.ts b/packages/effect-docker/src/gen/v1.53/TLSInfo.ts new file mode 100644 index 0000000..2784100 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/TLSInfo.ts @@ -0,0 +1,15 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +/** Information about the issuer of leaf TLS certificates and the trusted root CA certificate. */ +export const TLSInfo = S.Struct({ + /** The root CA certificate(s) that are used to validate leaf TLS certificates. */ + TrustRoot: S.optional(S.String), + /** The base64-url-safe-encoded raw subject bytes of the issuer. */ + CertIssuerSubject: S.optional(S.String), + /** The base64-url-safe-encoded raw public key bytes of the issuer. */ + CertIssuerPublicKey: S.optional(S.String), +}); +export type TLSInfo = S.Schema.Type; +export const TLSInfoEncoded = S.encodedSchema(TLSInfo); +export type TLSInfoEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/Task.ts b/packages/effect-docker/src/gen/v1.53/Task.ts new file mode 100644 index 0000000..0b96d62 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/Task.ts @@ -0,0 +1,33 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +import { ObjectVersion } from './ObjectVersion.ts'; +import { TaskSpec } from './TaskSpec.ts'; +import { GenericResources } from './GenericResources.ts'; +import { TaskStatus } from './TaskStatus.ts'; +import { TaskState } from './TaskState.ts'; + +export const Task = S.Struct({ + /** The ID of the task. */ + ID: S.optional(S.String), + Version: S.optional(ObjectVersion), + CreatedAt: S.optional(S.String), + UpdatedAt: S.optional(S.String), + /** Name of the task. */ + Name: S.optional(S.String), + /** User-defined key/value metadata. */ + Labels: S.optional(S.Record({ key: S.String, value: S.String })), + Spec: S.optional(TaskSpec), + /** The ID of the service this task is part of. */ + ServiceID: S.optional(S.String), + Slot: S.optional(pipe(S.Number, S.int())), + /** The ID of the node that this task is on. */ + NodeID: S.optional(S.String), + AssignedGenericResources: S.optional(GenericResources), + Status: S.optional(TaskStatus), + DesiredState: S.optional(TaskState), + JobIteration: S.optional(ObjectVersion), +}); +export type Task = S.Schema.Type; +export const TaskEncoded = S.encodedSchema(Task); +export type TaskEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/TaskSpec.ts b/packages/effect-docker/src/gen/v1.53/TaskSpec.ts new file mode 100644 index 0000000..5941ea7 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/TaskSpec.ts @@ -0,0 +1,414 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +import { PluginPrivilege } from './PluginPrivilege.ts'; +import { Mount } from './Mount.ts'; +import { HealthConfig } from './HealthConfig.ts'; +import { Limit } from './Limit.ts'; +import { ResourceObject } from './ResourceObject.ts'; +import { Platform } from './Platform.ts'; +import { NetworkAttachmentConfig } from './NetworkAttachmentConfig.ts'; + +/** User modifiable task configuration. */ +export const TaskSpec = S.Struct({ + /** + * Plugin spec for the service. _(Experimental release only.)_


+ * + * > **Note**: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are mutually exclusive. + * > PluginSpec is only used when the Runtime field is set to `plugin`. NetworkAttachmentSpec is + * > used when the Runtime field is set to `attachment`. + */ + PluginSpec: S.optional( + S.Struct({ + /** The name or 'alias' to use for the plugin. */ + Name: S.optional(S.String), + /** The plugin image reference to use. */ + Remote: S.optional(S.String), + /** Disable the plugin once scheduled. */ + Disabled: S.optional(S.Boolean), + PluginPrivilege: S.optional(S.Array(PluginPrivilege)), + }), + ), + /** + * Container spec for the service.


+ * + * > **Note**: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are mutually exclusive. + * > PluginSpec is only used when the Runtime field is set to `plugin`. NetworkAttachmentSpec is + * > used when the Runtime field is set to `attachment`. + */ + ContainerSpec: S.optional( + S.Struct({ + /** The image name to use for the container */ + Image: S.optional(S.String), + /** User-defined key/value data. */ + Labels: S.optional(S.Record({ key: S.String, value: S.String })), + /** The command to be run in the image. */ + Command: S.optional(S.Array(S.String)), + /** Arguments to the command. */ + Args: S.optional(S.Array(S.String)), + /** + * The hostname to use for the container, as a valid [RFC + * 1123](https://tools.ietf.org/html/rfc1123) hostname. + */ + Hostname: S.optional(S.String), + /** A list of environment variables in the form `VAR=value`. */ + Env: S.optional(S.Array(S.String)), + /** The working directory for commands to run in. */ + Dir: S.optional(S.String), + /** The user inside the container. */ + User: S.optional(S.String), + /** A list of additional groups that the container process will run as. */ + Groups: S.optional(S.Array(S.String)), + /** Security options for the container */ + Privileges: S.optional( + S.Struct({ + /** CredentialSpec for managed service account (Windows only) */ + CredentialSpec: S.optional( + S.Struct({ + /** + * Load credential spec from a Swarm Config with the given ID. The specified config must + * also be present in the Configs field with the Runtime property set. + * + *


+ * + * + * > **Note**: `CredentialSpec.File`, `CredentialSpec.Registry`, + * > and `CredentialSpec.Config` are mutually exclusive. + */ + Config: S.optional(S.String), + /** + * Load credential spec from this file. The file is read by the daemon, and must be present + * in the `CredentialSpecs` subdirectory in the docker data directory, which defaults to + * `C:\ProgramData\Docker\` on Windows. + * + * For example, specifying `spec.json` loads + * `C:\ProgramData\Docker\CredentialSpecs\spec.json`. + * + *


+ * + * > **Note**: `CredentialSpec.File`, `CredentialSpec.Registry`, + * > and `CredentialSpec.Config` are mutually exclusive. + */ + File: S.optional(S.String), + /** + * Load credential spec from this value in the Windows registry. The specified registry + * value must be located in: + * + * `HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Virtualization\Containers\CredentialSpecs` + * + *


+ * + * + * > **Note**: `CredentialSpec.File`, `CredentialSpec.Registry`, + * > and `CredentialSpec.Config` are mutually exclusive. + */ + Registry: S.optional(S.String), + }), + ), + /** SELinux labels of the container */ + SELinuxContext: S.optional( + S.Struct({ + /** Disable SELinux */ + Disable: S.optional(S.Boolean), + /** SELinux user label */ + User: S.optional(S.String), + /** SELinux role label */ + Role: S.optional(S.String), + /** SELinux type label */ + Type: S.optional(S.String), + /** SELinux level label */ + Level: S.optional(S.String), + }), + ), + /** Options for configuring seccomp on the container */ + Seccomp: S.optional( + S.Struct({ + Mode: S.optional(S.Literal('default', 'unconfined', 'custom')), + /** The custom seccomp profile as a json object */ + Profile: S.optional(S.String), + }), + ), + /** Options for configuring AppArmor on the container */ + AppArmor: S.optional( + S.Struct({ + Mode: S.optional(S.Literal('default', 'disabled')), + }), + ), + /** Configuration of the no_new_privs bit in the container */ + NoNewPrivileges: S.optional(S.Boolean), + }), + ), + /** Whether a pseudo-TTY should be allocated. */ + TTY: S.optional(S.Boolean), + /** Open `stdin` */ + OpenStdin: S.optional(S.Boolean), + /** Mount the container's root filesystem as read only. */ + ReadOnly: S.optional(S.Boolean), + /** Specification for mounts to be added to containers created as part of the service. */ + Mounts: S.optional(S.Array(Mount)), + /** Signal to stop the container. */ + StopSignal: S.optional(S.String), + /** Amount of time to wait for the container to terminate before forcefully killing it. */ + StopGracePeriod: S.optional(pipe(S.Number, S.int())), + HealthCheck: S.optional(HealthConfig), + /** + * A list of hostname/IP mappings to add to the container's `hosts` file. The format of extra + * hosts is specified in the [hosts(5)](http://man7.org/linux/man-pages/man5/hosts.5.html) man + * page: + * + * IP_address canonical_hostname [aliases...] + */ + Hosts: S.optional(S.Array(S.String)), + /** Specification for DNS related configurations in resolver configuration file (`resolv.conf`). */ + DNSConfig: S.optional( + S.Struct({ + /** The IP addresses of the name servers. */ + Nameservers: S.optional(S.Array(S.String)), + /** A search list for host-name lookup. */ + Search: S.optional(S.Array(S.String)), + /** A list of internal resolver variables to be modified (e.g., `debug`, `ndots:3`, etc.). */ + Options: S.optional(S.Array(S.String)), + }), + ), + /** Secrets contains references to zero or more secrets that will be exposed to the service. */ + Secrets: S.optional( + S.Array( + S.Struct({ + /** File represents a specific target that is backed by a file. */ + File: S.optional( + S.Struct({ + /** Name represents the final filename in the filesystem. */ + Name: S.optional(S.String), + /** UID represents the file UID. */ + UID: S.optional(S.String), + /** GID represents the file GID. */ + GID: S.optional(S.String), + /** Mode represents the FileMode of the file. */ + Mode: S.optional(pipe(S.Number, S.int())), + }), + ), + /** SecretID represents the ID of the specific secret that we're referencing. */ + SecretID: S.optional(S.String), + /** + * SecretName is the name of the secret that this references, but this is just provided for + * lookup/display purposes. The secret in the reference will be identified by its ID. + */ + SecretName: S.optional(S.String), + }), + ), + ), + /** + * An integer value containing the score given to the container in order to tune OOM killer + * preferences. + */ + OomScoreAdj: S.optional(pipe(S.Number, S.int())), + /** Configs contains references to zero or more configs that will be exposed to the service. */ + Configs: S.optional( + S.Array( + S.Struct({ + /** + * File represents a specific target that is backed by a file. + * + *


+ * + * > **Note**: `Configs.File` and `Configs.Runtime` are mutually exclusive + */ + File: S.optional( + S.Struct({ + /** Name represents the final filename in the filesystem. */ + Name: S.optional(S.String), + /** UID represents the file UID. */ + UID: S.optional(S.String), + /** GID represents the file GID. */ + GID: S.optional(S.String), + /** Mode represents the FileMode of the file. */ + Mode: S.optional(pipe(S.Number, S.int())), + }), + ), + /** + * Runtime represents a target that is not mounted into the container but is used by the task + * + *


+ * + * > **Note**: `Configs.File` and `Configs.Runtime` are mutually + * > exclusive + */ + Runtime: S.optional(S.Struct({})), + /** ConfigID represents the ID of the specific config that we're referencing. */ + ConfigID: S.optional(S.String), + /** + * ConfigName is the name of the config that this references, but this is just provided for + * lookup/display purposes. The config in the reference will be identified by its ID. + */ + ConfigName: S.optional(S.String), + }), + ), + ), + /** Isolation technology of the containers running the service. (Windows only) */ + Isolation: S.optional(S.Literal('default', 'process', 'hyperv', '')), + /** + * Run an init inside the container that forwards signals and reaps processes. This field is + * omitted if empty, and the default (as configured on the daemon) is used. + */ + Init: S.optional(S.Boolean), + /** + * Set kernel namedspaced parameters (sysctls) in the container. The Sysctls option on services + * accepts the same sysctls as the are supported on containers. Note that while the same sysctls + * are supported, no guarantees or checks are made about their suitability for a clustered + * environment, and it's up to the user to determine whether a given sysctl will work properly + * in a Service. + */ + Sysctls: S.optional(S.Record({ key: S.String, value: S.String })), + /** A list of kernel capabilities to add to the default set for the container. */ + CapabilityAdd: S.optional(S.Array(S.String)), + /** A list of kernel capabilities to drop from the default set for the container. */ + CapabilityDrop: S.optional(S.Array(S.String)), + /** + * A list of resource limits to set in the container. For example: `{"Name": "nofile", "Soft": + * 1024, "Hard": 2048}`" + */ + Ulimits: S.optional( + S.Array( + S.Struct({ + /** Name of ulimit */ + Name: S.optional(S.String), + /** Soft limit */ + Soft: S.optional(pipe(S.Number, S.int())), + /** Hard limit */ + Hard: S.optional(pipe(S.Number, S.int())), + }), + ), + ), + }), + ), + /** + * Read-only spec type for non-swarm containers attached to swarm overlay networks.


+ * + * > **Note**: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are mutually exclusive. + * > PluginSpec is only used when the Runtime field is set to `plugin`. NetworkAttachmentSpec is + * > used when the Runtime field is set to `attachment`. + */ + NetworkAttachmentSpec: S.optional( + S.Struct({ + /** ID of the container represented by this task */ + ContainerID: S.optional(S.String), + }), + ), + /** Resource requirements which apply to each individual container created as part of the service. */ + Resources: S.optional( + S.Struct({ + Limits: S.optional(Limit), + Reservations: S.optional(ResourceObject), + /** + * Amount of swap in bytes - can only be used together with a memory limit. If not specified, + * the default behaviour is to grant a swap space twice as big as the memory limit. Set to -1 to + * enable unlimited swap. + */ + SwapBytes: S.optional(pipe(S.Number, S.int(), S.greaterThanOrEqualTo(-1))), + /** + * Tune the service's containers' memory swappiness (0 to 100). If not specified, defaults to + * the containers' OS' default, generally 60, or whatever value was predefined in the image. Set + * to -1 to unset a previously set value. + */ + MemorySwappiness: S.optional( + pipe(S.Number, S.int(), S.greaterThanOrEqualTo(-1), S.lessThanOrEqualTo(100)), + ), + }), + ), + /** + * Specification for the restart policy which applies to containers created as part of this + * service. + */ + RestartPolicy: S.optional( + S.Struct({ + /** Condition for restart. */ + Condition: S.optional(S.Literal('none', 'on-failure', 'any')), + /** Delay between restart attempts. */ + Delay: S.optional(pipe(S.Number, S.int())), + /** + * Maximum attempts to restart a given container before giving up (default value is 0, which is + * ignored). + */ + MaxAttempts: S.optionalWith(pipe(S.Number, S.int()), { + default: () => 0, + }), + /** + * Windows is the time window used to evaluate the restart policy (default value is 0, which is + * unbounded). + */ + Window: S.optionalWith(pipe(S.Number, S.int()), { + default: () => 0, + }), + }), + ), + Placement: S.optional( + S.Struct({ + /** + * An array of constraint expressions to limit the set of nodes where a task can be scheduled. + * Constraint expressions can either use a _match_ (`==`) or _exclude_ (`!=`) rule. Multiple + * constraints find nodes that satisfy every expression (AND match). Constraints can match node + * or Docker Engine labels as follows: + * + * node attribute | matches | example + * ---------------------|--------------------------------|----------------------------------------------- + * `node.id` | Node ID | `node.id==2ivku8v2gvtg4` + * `node.hostname` | Node hostname | `node.hostname!=node-2` + * `node.role` | Node role (`manager`/`worker`) | `node.role==manager` + * `node.platform.os` | Node operating system | `node.platform.os==windows` + * `node.platform.arch` | Node architecture | `node.platform.arch==x86_64` + * `node.labels` | User-defined node labels | `node.labels.security==high` + * `engine.labels` | Docker Engine's labels | `engine.labels.operatingsystem==ubuntu-24.04` + * + * `engine.labels` apply to Docker Engine labels like operating system, + * drivers, etc. Swarm administrators add `node.labels` for operational + * purposes by using the [`node update endpoint`](#operation/NodeUpdate). + */ + Constraints: S.optional(S.Array(S.String)), + /** + * Preferences provide a way to make the scheduler aware of factors such as topology. They are + * provided in order from highest to lowest precedence. + */ + Preferences: S.optional( + S.Array( + S.Struct({ + Spread: S.optional( + S.Struct({ + /** Label descriptor, such as `engine.labels.az`. */ + SpreadDescriptor: S.optional(S.String), + }), + ), + }), + ), + ), + /** Maximum number of replicas for per node (default value is 0, which is unlimited) */ + MaxReplicas: S.optionalWith(pipe(S.Number, S.int()), { + default: () => 0, + }), + /** + * Platforms stores all the platforms that the service's image can run on. This field is used in + * the platform filter for scheduling. If empty, then the platform filter is off, meaning there + * are no scheduling restrictions. + */ + Platforms: S.optional(S.Array(Platform)), + }), + ), + /** A counter that triggers an update even if no relevant parameters have been changed. */ + ForceUpdate: S.optional(pipe(S.Number, S.int())), + /** Runtime is the type of runtime specified for the task executor. */ + Runtime: S.optional(S.String), + /** Specifies which networks the service should attach to. */ + Networks: S.optional(S.Array(NetworkAttachmentConfig)), + /** + * Specifies the log driver to use for tasks created from this spec. If not present, the default + * one for the swarm will be used, finally falling back to the engine default if not specified. + */ + LogDriver: S.optional( + S.Struct({ + Name: S.optional(S.String), + Options: S.optional(S.Record({ key: S.String, value: S.String })), + }), + ), +}); +export type TaskSpec = S.Schema.Type; +export const TaskSpecEncoded = S.encodedSchema(TaskSpec); +export type TaskSpecEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/TaskState.ts b/packages/effect-docker/src/gen/v1.53/TaskState.ts new file mode 100644 index 0000000..d1128a1 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/TaskState.ts @@ -0,0 +1,23 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +export const TaskState = S.Literal( + 'new', + 'allocated', + 'pending', + 'assigned', + 'accepted', + 'preparing', + 'ready', + 'starting', + 'running', + 'complete', + 'shutdown', + 'failed', + 'rejected', + 'remove', + 'orphaned', +); +export type TaskState = S.Schema.Type; +export const TaskStateEncoded = S.encodedSchema(TaskState); +export type TaskStateEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/TaskStatus.ts b/packages/effect-docker/src/gen/v1.53/TaskStatus.ts new file mode 100644 index 0000000..8aeb43f --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/TaskStatus.ts @@ -0,0 +1,19 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +import { TaskState } from './TaskState.ts'; +import { ContainerStatus } from './ContainerStatus.ts'; +import { PortStatus } from './PortStatus.ts'; + +/** Represents the status of a task. */ +export const TaskStatus = S.Struct({ + Timestamp: S.optional(S.String), + State: S.optional(TaskState), + Message: S.optional(S.String), + Err: S.optional(S.String), + ContainerStatus: S.optional(ContainerStatus), + PortStatus: S.optional(PortStatus), +}); +export type TaskStatus = S.Schema.Type; +export const TaskStatusEncoded = S.encodedSchema(TaskStatus); +export type TaskStatusEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/ThrottleDevice.ts b/packages/effect-docker/src/gen/v1.53/ThrottleDevice.ts new file mode 100644 index 0000000..488349b --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/ThrottleDevice.ts @@ -0,0 +1,12 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +export const ThrottleDevice = S.Struct({ + /** Device path */ + Path: S.optional(S.String), + /** Rate */ + Rate: S.optional(pipe(S.Number, S.int(), S.greaterThanOrEqualTo(0))), +}); +export type ThrottleDevice = S.Schema.Type; +export const ThrottleDeviceEncoded = S.encodedSchema(ThrottleDevice); +export type ThrottleDeviceEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/Topology.ts b/packages/effect-docker/src/gen/v1.53/Topology.ts new file mode 100644 index 0000000..281a01f --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/Topology.ts @@ -0,0 +1,11 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +/** + * A map of topological domains to topological segments. For in depth details, see documentation for + * the Topology object in the CSI specification. + */ +export const Topology = S.Record({ key: S.String, value: S.String }); +export type Topology = S.Schema.Type; +export const TopologyEncoded = S.encodedSchema(Topology); +export type TopologyEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/Volume.ts b/packages/effect-docker/src/gen/v1.53/Volume.ts new file mode 100644 index 0000000..db90663 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/Volume.ts @@ -0,0 +1,55 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +import { ClusterVolume } from './ClusterVolume.ts'; + +export const Volume = S.Struct({ + /** Name of the volume. */ + Name: S.String, + /** Name of the volume driver used by the volume. */ + Driver: S.String, + /** Mount path of the volume on the host. */ + Mountpoint: S.String, + /** Date/Time the volume was created. */ + CreatedAt: S.optional(S.String), + /** + * Low-level details about the volume, provided by the volume driver. Details are returned as a + * map with key/value pairs: `{"key":"value","key2":"value2"}`. + * + * The `Status` field is optional, and is omitted if the volume driver does not support this + * feature. + */ + Status: S.optional(S.Record({ key: S.String, value: S.Struct({}) })), + /** User-defined key/value metadata. */ + Labels: S.Record({ key: S.String, value: S.String }), + /** + * The level at which the volume exists. Either `global` for cluster-wide, or `local` for machine + * level. + */ + Scope: S.Literal('local', 'global'), + ClusterVolume: S.optional(ClusterVolume), + /** The driver specific options used when creating the volume. */ + Options: S.Record({ key: S.String, value: S.String }), + /** + * Usage details about the volume. This information is used by the `GET /system/df` endpoint, and + * omitted in other endpoints. + */ + UsageData: S.optional( + S.Struct({ + /** + * Amount of disk space used by the volume (in bytes). This information is only available for + * volumes created with the `"local"` volume driver. For volumes created with other volume + * drivers, this field is set to `-1` ("not available") + */ + Size: pipe(S.Number, S.int()), + /** + * The number of containers referencing this volume. This field is set to `-1` if the + * reference-count is not available. + */ + RefCount: pipe(S.Number, S.int()), + }), + ), +}); +export type Volume = S.Schema.Type; +export const VolumeEncoded = S.encodedSchema(Volume); +export type VolumeEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/VolumeCreateRequest.ts b/packages/effect-docker/src/gen/v1.53/VolumeCreateRequest.ts new file mode 100644 index 0000000..17d3f34 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/VolumeCreateRequest.ts @@ -0,0 +1,25 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +import { ClusterVolumeSpec } from './ClusterVolumeSpec.ts'; + +/** Volume configuration */ +export const VolumeCreateRequest = S.Struct({ + /** The new volume's name. If not specified, Docker generates a name. */ + Name: S.optional(S.String), + /** Name of the volume driver to use. */ + Driver: S.optionalWith(S.String, { + default: () => 'local', + }), + /** + * A mapping of driver options and values. These options are passed directly to the driver and are + * driver specific. + */ + DriverOpts: S.optional(S.Record({ key: S.String, value: S.String })), + /** User-defined key/value metadata. */ + Labels: S.optional(S.Record({ key: S.String, value: S.String })), + ClusterVolumeSpec: S.optional(ClusterVolumeSpec), +}); // VolumeConfig +export type VolumeCreateRequest = S.Schema.Type; +export const VolumeCreateRequestEncoded = S.encodedSchema(VolumeCreateRequest); +export type VolumeCreateRequestEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/VolumeListResponse.ts b/packages/effect-docker/src/gen/v1.53/VolumeListResponse.ts new file mode 100644 index 0000000..7ab7348 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/VolumeListResponse.ts @@ -0,0 +1,15 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +import { Volume } from './Volume.ts'; + +/** Volume list response */ +export const VolumeListResponse = S.Struct({ + /** List of volumes */ + Volumes: S.optional(S.Array(Volume)), + /** Warnings that occurred when fetching the list of volumes. */ + Warnings: S.optional(S.Array(S.String)), +}); // VolumeListResponse +export type VolumeListResponse = S.Schema.Type; +export const VolumeListResponseEncoded = S.encodedSchema(VolumeListResponse); +export type VolumeListResponseEncoded = S.Schema.Encoded; diff --git a/packages/effect-docker/src/gen/v1.53/VolumesDiskUsage.ts b/packages/effect-docker/src/gen/v1.53/VolumesDiskUsage.ts new file mode 100644 index 0000000..65ea783 --- /dev/null +++ b/packages/effect-docker/src/gen/v1.53/VolumesDiskUsage.ts @@ -0,0 +1,19 @@ + +import { pipe, Option, Schema as S } from 'effect'; + +/** Represents system data usage for volume resources. */ +export const VolumesDiskUsage = S.Struct({ + /** Count of active volumes. */ + ActiveCount: S.optional(pipe(S.Number, S.int())), + /** Count of all volumes. */ + TotalCount: S.optional(pipe(S.Number, S.int())), + /** Disk space that can be reclaimed by removing inactive volumes. */ + Reclaimable: S.optional(pipe(S.Number, S.int())), + /** Disk space in use by volumes. */ + TotalSize: S.optional(pipe(S.Number, S.int())), + /** List of volumes. */ + Items: S.optional(S.Array(S.Struct({}))), +}); +export type VolumesDiskUsage = S.Schema.Type; +export const VolumesDiskUsageEncoded = S.encodedSchema(VolumesDiskUsage); +export type VolumesDiskUsageEncoded = S.Schema.Encoded;