documint.content

Documint content storage.

`IStorage` implements the public API for interacting with storage.

IStorage

protocol

Content storage.

members

allocate-entry

(allocate-entry this session-id thunk)
Allocate a content entry, the result is a `IStorageEntry`.

destroy

(destroy this)
Destroy this storage.

get-content

(get-content this entry-id)
Retrieve the content of an entry from storage.

The result is a deferred map containing `:stream` and `:content-type` keys,
or the response is `nil` if no such content identifier exists.

put-content

(put-content this session-id content-type readable)
Allocate and realize a content entry.

IStorageEntry

protocol

members

content-id

(content-id this)
Identifier for this content.

entry-content

(entry-content this)
Fetch the content for this entry.

The result is a deferred map containing `:stream` and `:content-type` keys,
or the response is `nil` if no such content identifier exists.

realize-thunk

(realize-thunk this)
Realize the entry's thunk.

session-id

(session-id this)
Session identifier for this content.

temp-file-storage

(temp-file-storage next-id)(temp-file-storage next-id parent)
An `IStorage` implementation backed by temporary files.