| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- const { NotImplementedError } = require('./Errors')
- module.exports = class AbstractPersistor {
- async sendFile(location, target, source) {
- throw new NotImplementedError('method not implemented in persistor', {
- method: 'sendFile',
- location,
- target,
- source
- })
- }
- async sendStream(location, target, sourceStream, opts = {}) {
- throw new NotImplementedError('method not implemented in persistor', {
- method: 'sendStream',
- location,
- target,
- opts
- })
- }
- // opts may be {start: Number, end: Number}
- async getObjectStream(location, name, opts) {
- throw new NotImplementedError('method not implemented in persistor', {
- method: 'getObjectStream',
- location,
- name,
- opts
- })
- }
- async getRedirectUrl(location, name) {
- throw new NotImplementedError('method not implemented in persistor', {
- method: 'getRedirectUrl',
- location,
- name
- })
- }
- async getObjectSize(location, name) {
- throw new NotImplementedError('method not implemented in persistor', {
- method: 'getObjectSize',
- location,
- name
- })
- }
- async getObjectMd5Hash(location, name) {
- throw new NotImplementedError('method not implemented in persistor', {
- method: 'getObjectMd5Hash',
- location,
- name
- })
- }
- async copyObject(location, fromName, toName) {
- throw new NotImplementedError('method not implemented in persistor', {
- method: 'copyObject',
- location,
- fromName,
- toName
- })
- }
- async deleteObject(location, name) {
- throw new NotImplementedError('method not implemented in persistor', {
- method: 'deleteObject',
- location,
- name
- })
- }
- async deleteDirectory(location, name) {
- throw new NotImplementedError('method not implemented in persistor', {
- method: 'deleteDirectory',
- location,
- name
- })
- }
- async checkIfObjectExists(location, name) {
- throw new NotImplementedError('method not implemented in persistor', {
- method: 'checkIfObjectExists',
- location,
- name
- })
- }
- async directorySize(location, name) {
- throw new NotImplementedError('method not implemented in persistor', {
- method: 'directorySize',
- location,
- name
- })
- }
- }
|