GCSArtifact服务(Service)
An artifact service implementation using Google Cloud Storage (GCS).
The blob name format used depends on whether the filename has a user namespace:
For files with user namespace (starting with "user:"):
{appName}/{userId}/user/{filename}/{version}For regular session-scoped files:
{appName}/{userId}/{sessionId}/{filename}/{version}
A session whose id is literally user therefore shares the user-scope prefix, and listArtifactKeys reports its session-scoped filenames to that user's other sessions, which cannot load them.
函数
Link copied to clipboard
删除一个工件(artifact)。
Link copied to clipboard
列出当前会话中可见的文件名:包括会话自身生成的文件以及用户创建的文件。 user: ones.
Link copied to clipboard
列出某个软件组件的所有版本(以修订版本号的形式表示)。
Link copied to clipboard
open suspend override fun loadArtifact(sessionKey: SessionKey, filename: String, version: Int? = null): Part?
获取一个工件(artifact)。
Link copied to clipboard
open suspend override fun saveAndReloadArtifact(sessionKey: SessionKey, filename: String, artifact: Part): Part
保存一个“artefact”(即某种数据或对象),并在文件数据(fileData)可用时将其一并返回。
Link copied to clipboard
open suspend override fun saveArtifact(sessionKey: SessionKey, filename: String, artifact: Part): Int
用于保存某个“文物”(即某个具有特殊价值或历史意义的物品)。