forked from alanpoon/actor-interfaces
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathblobstore.widl
63 lines (53 loc) · 1.21 KB
/
blobstore.widl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
namespace "wasmcloud:blobstore"
interface {
CreateContainer(id: string): Container
RemoveContainer(id: string): BlobstoreResult
RemoveObject(id: string, container_id: string): BlobstoreResult
ListObjects(container_id: string): BlobList
UploadChunk{chunk: FileChunk}: void
StartDownload(blob_id: string, container_id: string, chunk_size: u64, context: string?): BlobstoreResult
StartUpload{blob: FileChunk}: BlobstoreResult
GetObjectInfo(blob_id: string, container_id: string): Blob
ReceiveChunk{chunk: FileChunk}: void
}
type BlobstoreResult {
success: bool
error: string?
}
type FileChunk {
sequenceNo: u64,
container: Container,
id: string,
totalBytes: u64
chunkSize: u64,
context: string?,
chunkBytes: bytes
}
type Container {
id: string
}
type ContainerList {
containers: [Container]
}
type Blob {
id: string
container: Container
byteSize: u64
}
type BlobList {
blobs: [Blob]
}
type StreamRequest {
id: string
container: Container
chunkSize: u64
context: string?
}
type Transfer {
blobId: string
container: Container
chunkSize: u64
totalSize: u64
totalChunks: u64
context: string?
}