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
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.WireguardConfigVariantSchema = 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 WireguardConfig 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 on the
* peers 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 WireguardConfigVariantSchema = exports.WireguardConfigVariantSchema = /*#__PURE__*/VariantSchema.make({
variants: ["json", "uapi"],
defaultVariant: "json"
});
//# sourceMappingURL=wireguardConfig.js.map