UNPKG

reduct-js

Version:

ReductStore Client SDK for Javascript/NodeJS/Typescript

42 lines (41 loc) 1.02 kB
/** * Information about entry */ export class EntryInfo { constructor() { /** * Name of the entry */ this.name = ""; /** * Number of blocks */ this.blockCount = 0n; /** * Number of records */ this.recordCount = 0n; /** * Size of stored data in the bucket in bytes */ this.size = 0n; /** * Unix timestamp of the oldest record in microseconds */ this.oldestRecord = 0n; /** * Unix timestamp of the latest record in microseconds */ this.latestRecord = 0n; } static parse(bucket) { return { name: bucket.name, blockCount: BigInt(bucket.block_count), recordCount: BigInt(bucket.record_count), size: BigInt(bucket.size), oldestRecord: BigInt(bucket.oldest_record), latestRecord: BigInt(bucket.latest_record), }; } }