-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathconstants.js
48 lines (45 loc) · 1.57 KB
/
constants.js
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
import {
add as storeAdd,
remove as storeRemove
} from '@web3-storage/capabilities/store'
import {
add as uploadAdd,
remove as uploadRemove
} from '@web3-storage/capabilities/upload'
import {
add as blobAdd,
remove as blobRemove
} from '@web3-storage/capabilities/blob'
// UCAN protocol
export const BLOB_ADD = blobAdd.can
export const BLOB_REMOVE = blobRemove.can
export const STORE_ADD = storeAdd.can
export const STORE_REMOVE = storeRemove.can
export const UPLOAD_ADD = uploadAdd.can
export const UPLOAD_REMOVE = uploadRemove.can
// Admin Metrics
export const METRICS_NAMES = {
UPLOAD_ADD_TOTAL: `${UPLOAD_ADD}-total`,
UPLOAD_REMOVE_TOTAL: `${UPLOAD_REMOVE}-total`,
BLOB_ADD_TOTAL: `${BLOB_ADD}-total`,
BLOB_ADD_SIZE_TOTAL: `${BLOB_ADD}-size-total`,
BLOB_REMOVE_TOTAL: `${BLOB_REMOVE}-total`,
BLOB_REMOVE_SIZE_TOTAL: `${BLOB_REMOVE}-size-total`,
STORE_ADD_TOTAL: `${STORE_ADD}-total`,
STORE_ADD_SIZE_TOTAL: `${STORE_ADD}-size-total`,
STORE_REMOVE_TOTAL: `${STORE_REMOVE}-total`,
STORE_REMOVE_SIZE_TOTAL: `${STORE_REMOVE}-size-total`,
}
// Space Metrics
export const SPACE_METRICS_NAMES = {
UPLOAD_ADD_TOTAL: `${UPLOAD_ADD}-total`,
UPLOAD_REMOVE_TOTAL: `${UPLOAD_REMOVE}-total`,
BLOB_ADD_TOTAL: `${BLOB_ADD}-total`,
BLOB_ADD_SIZE_TOTAL: `${BLOB_ADD}-size-total`,
BLOB_REMOVE_TOTAL: `${BLOB_REMOVE}-total`,
BLOB_REMOVE_SIZE_TOTAL: `${BLOB_REMOVE}-size-total`,
STORE_ADD_TOTAL: `${STORE_ADD}-total`,
STORE_ADD_SIZE_TOTAL: `${STORE_ADD}-size-total`,
STORE_REMOVE_TOTAL: `${STORE_REMOVE}-total`,
STORE_REMOVE_SIZE_TOTAL: `${STORE_REMOVE}-size-total`,
}