UNPKG

the-wireguard-effect

Version:

Cross platform wireguard api client for nodejs built on wireguard-go with effect-ts

24 lines (23 loc) 1.59 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.WireguardPeerConfigVariantSchema = void 0; var VariantSchema = _interopRequireWildcard(require("@effect/experimental/VariantSchema")); function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } /** * We use a variant schema for the WireguardPeerConfig schema to allow for * different representations of the same data. The `json` variant is the default * representation of the data, while the `uapi` variant is used for the * userspace API representation. The Uapi variant includes extra fields like * `rx_bytes` and `tx_bytes` which can only be decoded, not encoded. We do not * have an `ini` variant, because it is modeled as a transformation of the * `json` variant since it has the same fields. * * @internal */ const WireguardPeerConfigVariantSchema = exports.WireguardPeerConfigVariantSchema = /*#__PURE__*/VariantSchema.make({ variants: ["json", "uapi"], defaultVariant: "json" }); //# sourceMappingURL=wireguardPeer.js.map