Add additional storage providers: Google Drive, Storj, MinIO, FTP, etc. #95
Labels
Content-Length: 238959 | pFad | http://github.com/kerberos-io/agent/issues/95
6CFetched URL: http://github.com/kerberos-io/agent/issues/95
Alternative Proxies:
Currently we only have Kerberos Vault and Kerberos Hub integration implemented. However we would like to embrace other 3rd party tools such as Google Drive, Storj, Minio, Dropbox and others. With this open issue, we would like to request help from our community to implement more storage/persistence providers. We'll discuss here what is required to contribute to this feature.
Supported persistence:
How to contribute
A detailed description is found below, describing the different parts that need to be added and modified. However a good PR (#96) can be found here.
Machinery (Golang/Backend/API)
Before implementing a new function make sure we know all the credentials/information that is required for creating a new provider. Have a look at the
./machinery/src/models/Config.go
file, and add the additional information that you require. Also note that you'll need a newshort name
for your provider. For exampleStorj
>storj
orDropbox
>dropbox
.Create a new file in the
machinery
project:machinery/src/cloud
.Implement a single upload function with following
function
description. The function expects aconfiguration
object which holds the credentials of the relevant provider, and thefileName
which refers to the file that we want to upload. The return statement(bool, bool, error)
defines if the upload was successful, if the file can be removed from disk (it might be that we need to try againfalse
or we don't need to upload it anymoretrue
), and if any error occurred.Add a verify function, that will test if the configuration is working. This is called from the front-end by click the
Verify connection
button.Once implemented we need to adapt the upload logic in
./machinery/src/cloud/Cloud.go
. Extend theif
statement and add your new function.UI (Front-end)
Open the
ui/src/pages/Settings/Settings.jsx
file. Most of the work is done here.storageTypes
array with the new provider.ui/public/locales/
folder, make sure your labels/translation is copied to all the different translation files.The text was updated successfully, but these errors were encountered: