@solid/community-server
Version:
Community Solid Server: an open and modular implementation of the Solid specifications
25 lines (24 loc) • 1.57 kB
TypeScript
import type { Readable } from 'node:stream';
import type { Representation } from '../../http/representation/Representation';
import type { RepresentationMetadata } from '../../http/representation/RepresentationMetadata';
import type { ResourceIdentifier } from '../../http/representation/ResourceIdentifier';
import type { Guarded } from '../../util/GuardedStream';
import type { AtomicDataAccessor } from './AtomicDataAccessor';
import type { DataAccessor } from './DataAccessor';
/**
* DataAccessor that calls the corresponding functions of the source DataAccessor.
* Can be extended by data accessors that do not want to override all functions
* by implementing a decorator pattern.
*/
export declare class PassthroughDataAccessor implements DataAccessor {
protected readonly accessor: AtomicDataAccessor;
constructor(accessor: DataAccessor);
writeDocument(identifier: ResourceIdentifier, data: Guarded<Readable>, metadata: RepresentationMetadata): Promise<void>;
writeContainer(identifier: ResourceIdentifier, metadata: RepresentationMetadata): Promise<void>;
canHandle(representation: Representation): Promise<void>;
getData(identifier: ResourceIdentifier): Promise<Guarded<Readable>>;
getMetadata(identifier: ResourceIdentifier): Promise<RepresentationMetadata>;
writeMetadata(identifier: ResourceIdentifier, metadata: RepresentationMetadata): Promise<void>;
getChildren(identifier: ResourceIdentifier): AsyncIterableIterator<RepresentationMetadata>;
deleteResource(identifier: ResourceIdentifier): Promise<void>;
}