# ArtifactService

interface ArtifactService

Base interface for artifact services.

An artifact is uniquely identified by the session it belongs to (via SessionKey) plus its `filename` within that session.

#### Inheritors

InMemoryArtifactService
GcsArtifactService

## Functions

deleteArtifact
Link copied to clipboard
abstract suspend fun deleteArtifact(sessionKey: SessionKey, filename: String)

Deletes an artifact.

listArtifactKeys
Link copied to clipboard
abstract suspend fun listArtifactKeys(sessionKey: SessionKey): List<String>

Lists the filenames of all artifacts within a session.

listVersions
Link copied to clipboard
abstract suspend fun listVersions(sessionKey: SessionKey, filename: String): List<Int>

Lists all the versions (as revision IDs) of an artifact.

loadArtifact
Link copied to clipboard
abstract suspend fun loadArtifact(sessionKey: SessionKey, filename: String, version: Int? = null): Part?

Gets an artifact.

saveAndReloadArtifact
Link copied to clipboard
abstract suspend fun saveAndReloadArtifact(sessionKey: SessionKey, filename: String, artifact: Part): Part

Saves an artifact and returns it with fileData if available.

saveArtifact
Link copied to clipboard
abstract suspend fun saveArtifact(sessionKey: SessionKey, filename: String, artifact: Part): Int

Saves an artifact.