瀏覽代碼

feat: generic S3 module

NGPixel 5 年之前
父節點
當前提交
e45145986a
共有 2 個文件被更改,包括 42 次插入0 次删除
  1. 39 0
      server/modules/storage/s3generic/definition.yml
  2. 3 0
      server/modules/storage/s3generic/storage.js

+ 39 - 0
server/modules/storage/s3generic/definition.yml

@@ -0,0 +1,39 @@
+key: s3generic
+title: S3 Generic
+description: Generic storage module for S3-compatible services.
+author: requarks.io
+logo: https://static.requarks.io/logo/aws-s3-alt.svg
+website: https://wiki.js.org
+isAvailable: true
+supportedModes:
+  - push
+defaultMode: push
+schedule: false
+props:
+  endpoint:
+    type: String
+    title: Endpoint URI
+    hint: The full S3-compliant endpoint URI.
+    default: https://service.region.example.com
+    order: 1
+  bucket:
+    type: String
+    title: Unique bucket name
+    hint: The unique bucket name to create (e.g. wiki-johndoe)
+    order: 2
+  accessKeyId:
+    type: String
+    title: Access Key ID
+    hint: The Access Key ID.
+    order: 3
+  secretAccessKey :
+    type: String
+    title: Access Key Secret
+    hint: The Access Key Secret for the Access Key ID above.
+    sensitive: true
+    order: 4
+actions:
+  - handler: exportAll
+    label: Export All
+    hint: Output all content from the DB to the external service, overwriting any existing data. If you enabled this module after content was created or you temporarily disabled it, you'll want to execute this action to add the missing content.
+

+ 3 - 0
server/modules/storage/s3generic/storage.js

@@ -0,0 +1,3 @@
+const S3CompatibleStorage = require('../s3/common')
+
+module.exports = new S3CompatibleStorage('S3Generic')