the-moby-effect
Version:
Moby/Docker API client built using effect-ts
95 lines (94 loc) • 4.9 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.SwarmContainerSpec = void 0;
var Schema = _interopRequireWildcard(require("effect/Schema"));
var MobySchemas = _interopRequireWildcard(require("../schemas/index.js"));
var ContainerHealthConfig = _interopRequireWildcard(require("./ContainerHealthConfig.generated.js"));
var ContainerUlimit = _interopRequireWildcard(require("./ContainerUlimit.generated.js"));
var Mount = _interopRequireWildcard(require("./Mount.generated.js"));
var SwarmConfigReference = _interopRequireWildcard(require("./SwarmConfigReference.generated.js"));
var SwarmDNSConfig = _interopRequireWildcard(require("./SwarmDNSConfig.generated.js"));
var SwarmPrivileges = _interopRequireWildcard(require("./SwarmPrivileges.generated.js"));
var SwarmSecretReference = _interopRequireWildcard(require("./SwarmSecretReference.generated.js"));
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
class SwarmContainerSpec extends /*#__PURE__*/Schema.Class("SwarmContainerSpec")({
Image: /*#__PURE__*/Schema.optional(Schema.String),
Labels: /*#__PURE__*/Schema.optionalWith(/*#__PURE__*/Schema.Record({
key: Schema.String,
value: Schema.String
}), {
nullable: true
}),
Command: /*#__PURE__*/Schema.optionalWith(/*#__PURE__*/Schema.Array(Schema.String), {
nullable: true
}),
Args: /*#__PURE__*/Schema.optionalWith(/*#__PURE__*/Schema.Array(Schema.String), {
nullable: true
}),
Hostname: /*#__PURE__*/Schema.optional(Schema.String),
Env: /*#__PURE__*/Schema.optionalWith(/*#__PURE__*/Schema.Array(Schema.String), {
nullable: true
}),
Dir: /*#__PURE__*/Schema.optional(Schema.String),
User: /*#__PURE__*/Schema.optional(Schema.String),
Groups: /*#__PURE__*/Schema.optionalWith(/*#__PURE__*/Schema.Array(Schema.String), {
nullable: true
}),
Privileges: /*#__PURE__*/Schema.optionalWith(SwarmPrivileges.SwarmPrivileges, {
nullable: true
}),
Init: /*#__PURE__*/Schema.optionalWith(Schema.Boolean, {
nullable: true
}),
StopSignal: /*#__PURE__*/Schema.optional(Schema.String),
TTY: /*#__PURE__*/Schema.optional(Schema.Boolean),
OpenStdin: /*#__PURE__*/Schema.optional(Schema.Boolean),
ReadOnly: /*#__PURE__*/Schema.optional(Schema.Boolean),
Mounts: /*#__PURE__*/Schema.optionalWith(/*#__PURE__*/Schema.Array(/*#__PURE__*/Schema.NullOr(Mount.Mount)), {
nullable: true
}),
StopGracePeriod: /*#__PURE__*/Schema.optionalWith(MobySchemas.Int64, {
nullable: true
}),
Healthcheck: /*#__PURE__*/Schema.optionalWith(ContainerHealthConfig.ContainerHealthConfig, {
nullable: true
}),
Hosts: /*#__PURE__*/Schema.optionalWith(/*#__PURE__*/Schema.Array(Schema.String), {
nullable: true
}),
DNSConfig: /*#__PURE__*/Schema.optionalWith(SwarmDNSConfig.SwarmDNSConfig, {
nullable: true
}),
Secrets: /*#__PURE__*/Schema.optionalWith(/*#__PURE__*/Schema.Array(/*#__PURE__*/Schema.NullOr(SwarmSecretReference.SwarmSecretReference)), {
nullable: true
}),
Configs: /*#__PURE__*/Schema.optionalWith(/*#__PURE__*/Schema.Array(/*#__PURE__*/Schema.NullOr(SwarmConfigReference.SwarmConfigReference)), {
nullable: true
}),
Isolation: /*#__PURE__*/Schema.optional(Schema.String),
Sysctls: /*#__PURE__*/Schema.optionalWith(/*#__PURE__*/Schema.Record({
key: Schema.String,
value: Schema.String
}), {
nullable: true
}),
CapabilityAdd: /*#__PURE__*/Schema.optionalWith(/*#__PURE__*/Schema.Array(Schema.String), {
nullable: true
}),
CapabilityDrop: /*#__PURE__*/Schema.optionalWith(/*#__PURE__*/Schema.Array(Schema.String), {
nullable: true
}),
Ulimits: /*#__PURE__*/Schema.optionalWith(/*#__PURE__*/Schema.Array(/*#__PURE__*/Schema.NullOr(ContainerUlimit.ContainerUlimit)), {
nullable: true
}),
OomScoreAdj: /*#__PURE__*/Schema.optional(MobySchemas.Int64)
}, {
identifier: "SwarmContainerSpec",
title: "swarm.ContainerSpec",
documentation: "https://github.com/moby/moby/blob/7d861e889cd2214b38c8f1f3f997bf003c77739d/api/types/swarm/container.go#L86-L119"
}) {}
exports.SwarmContainerSpec = SwarmContainerSpec;
//# sourceMappingURL=SwarmContainerSpec.generated.js.map