k8ts
Version:
Powerful framework for building Kubernetes manifests in TypeScript.
29 lines • 784 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.parseBackend = parseBackend;
const error_1 = require("../../../error");
function parseBackend(backend) {
switch (backend?.type) {
case undefined:
case null:
return {};
case "HostPath":
return {
hostPath: {
path: backend.path,
type: backend.type
}
};
case "Local":
return {
local: {
path: backend.path
}
};
default:
throw new error_1.MakeError(`Unknown backend kind!`, {
backend
});
}
}
//# sourceMappingURL=parse-backend.js.map