16583: Add "Intermediate" to collection type filters
[arvados-workbench2.git] / src / models / mount-types.ts
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
5 export enum MountKind {
6     COLLECTION = 'collection',
7     GIT_TREE = 'git_tree',
8     TEMPORARY_DIRECTORY = 'tmp',
9     KEEP = 'keep',
10     MOUNTED_FILE = 'file',
11     JSON = 'json'
12 }
13
14 export type MountType =
15     CollectionMount |
16     GitTreeMount |
17     TemporaryDirectoryMount |
18     KeepMount |
19     JSONMount |
20     FileMount;
21
22 export interface CollectionMount {
23     kind: MountKind.COLLECTION;
24     uuid?: string;
25     portable_data_hash?: string;
26     path?: string;
27     writable?: boolean;
28 }
29
30 export interface GitTreeMount {
31     kind: MountKind.GIT_TREE;
32     uuid: string;
33     commit: string;
34     path?: string;
35 }
36
37 export enum TemporaryDirectoryDeviceType {
38     RAM = 'ram',
39     SSD = 'ssd',
40     DISK = 'disk',
41     NETWORK = 'network',
42 }
43
44 export interface TemporaryDirectoryMount {
45     kind: MountKind.TEMPORARY_DIRECTORY;
46     capacity: number;
47     deviceType: TemporaryDirectoryDeviceType;
48 }
49
50 export interface KeepMount {
51     kind: MountKind.KEEP;
52 }
53
54 export interface JSONMount {
55     kind: MountKind.JSON;
56     content: any;
57 }
58
59 export interface FileMount {
60     kind: MountKind.MOUNTED_FILE;
61     path: string;
62 }