DocumentStorageService Class

Packages > @fluidframework/routerlicious-driver > DocumentStorageService

Document access to underlying storage for routerlicious driver.

Signature:

export declare class DocumentStorageService implements IDocumentStorageService 

Implements: IDocumentStorageService

Constructors

List of constructors for this class
Constructor Modifiers Description
(constructor)(id, manager) Constructs a new instance of the DocumentStorageService class

Properties

List of properties for this class
Property Modifiers Type Description
id string
manager gitStorage.GitManager
repositoryUrl string

Methods

List of methods on this class
Method Modifiers Description
createBlob(file)
downloadSummary(handle)
getSnapshotTree(version)
getVersions(versionId, count)
read(blobId)
readBlob(blobId)
uploadSummaryWithContext(summary, context)
write(tree, parents, message, ref)

Constructors

DocumentStorageService.(constructor)

Constructs a new instance of the DocumentStorageService class

Signature:

constructor(id: string, manager: gitStorage.GitManager);

Parameters

List of parameters
Parameter Type Description
id string
manager gitStorage.GitManager

Properties

id

Signature:

readonly id: string;

manager

Signature:

manager: gitStorage.GitManager;

repositoryUrl

Signature:

get repositoryUrl(): string;

Methods

createBlob

Signature:

createBlob(file: ArrayBufferLike): Promise<ICreateBlobResponse>;

Parameters

List of parameters
Parameter Type Description
file ArrayBufferLike

Returns:

Promise<ICreateBlobResponse>

downloadSummary

Signature:

downloadSummary(handle: ISummaryHandle): Promise<ISummaryTree>;

Parameters

List of parameters
Parameter Type Description
handle ISummaryHandle

Returns:

Promise<ISummaryTree>

getSnapshotTree

Signature:

getSnapshotTree(version?: IVersion): Promise<ISnapshotTree | null>;

Parameters

List of parameters
Parameter Type Description
version IVersion

Returns:

Promise<ISnapshotTree | null>

getVersions

Signature:

getVersions(versionId: string, count: number): Promise<IVersion[]>;

Parameters

List of parameters
Parameter Type Description
versionId string
count number

Returns:

Promise<IVersion[]>

read

Signature:

read(blobId: string): Promise<string>;

Parameters

List of parameters
Parameter Type Description
blobId string

Returns:

Promise<string>

readBlob

Signature:

readBlob(blobId: string): Promise<ArrayBufferLike>;

Parameters

List of parameters
Parameter Type Description
blobId string

Returns:

Promise<ArrayBufferLike>

uploadSummaryWithContext

Signature:

uploadSummaryWithContext(summary: ISummaryTree, context: ISummaryContext): Promise<string>;

Parameters

List of parameters
Parameter Type Description
summary ISummaryTree
context ISummaryContext

Returns:

Promise<string>

write

Signature:

write(tree: ITree, parents: string[], message: string, ref: string): Promise<IVersion>;

Parameters

List of parameters
Parameter Type Description
tree ITree
parents string[]
message string
ref string

Returns:

Promise<IVersion>