Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F33321045
D8990.1768845024.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D8990.1768845024.diff
View Options
diff --git a/lib/facts/backup-service.js b/lib/facts/backup-service.js
new file mode 100644
--- /dev/null
+++ b/lib/facts/backup-service.js
@@ -0,0 +1,45 @@
+// @flow
+
+type BackupServiceEndpointPath =
+ | '/backups'
+ | '/backups/:backupID/user_keys'
+ | '/backups/:backupID/user_data'
+ | '/backups/latest/:username/backup_id'
+ | '/backups/latest/:username/user_keys';
+
+export type BackupServiceHTTPEndpoint = {
+ +path: BackupServiceEndpointPath,
+ +method: 'GET' | 'POST',
+};
+
+const httpEndpoints = Object.freeze({
+ // endpoints with auth
+ UPLOAD_BACKUP: {
+ path: '/backups',
+ method: 'POST',
+ },
+ GET_USER_KEYS: {
+ path: '/backups/:backupID/user_keys',
+ method: 'GET',
+ },
+ GET_USER_DATA: {
+ path: '/backups/:backupID/user_data',
+ method: 'GET',
+ },
+ // endpoints without auth
+ GET_LATEST_BACKUP_ID: {
+ path: '/backups/latest/:username/backup_id',
+ method: 'GET',
+ },
+ GET_LATEST_USER_KEYS: {
+ path: '/backups/latest/:username/user_keys',
+ method: 'GET',
+ },
+});
+
+const config = {
+ url: 'http://localhost:50052',
+ httpEndpoints,
+};
+
+export default config;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jan 19, 5:50 PM (1 h, 32 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5957583
Default Alt Text
D8990.1768845024.diff (1 KB)
Attached To
Mode
D8990: [client-backup] add backup-service facts
Attached
Detach File
Event Timeline
Log In to Comment