UNPKG

longurl-js

Version:

LongURL - Programmable URL management framework with entity-driven design and production-ready infrastructure

28 lines (27 loc) 694 B
"use strict"; /** * Core Storage Adapter Interface * * Defines the contract that all storage adapters must implement. * This enables LongURL to work with different storage backends. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.StorageAdapter = void 0; class StorageAdapter { /** * Optional: Batch operations for performance */ async saveBatch(data) { // Default implementation: save one by one for (const item of data) { await this.save(item.urlId, item); } } /** * Optional: Health check */ async healthCheck() { return true; } } exports.StorageAdapter = StorageAdapter;