mirror of
https://github.com/offen/docker-volume-backup.git
synced 2026-04-01 07:24:29 +02:00
Fixed token issue, added OAuth2 including recipe and docs.
This commit is contained in:
@@ -70,7 +70,9 @@ type Config struct {
|
||||
AzureStorageContainerName string `split_words:"true"`
|
||||
AzureStoragePath string `split_words:"true"`
|
||||
AzureStorageEndpoint string `split_words:"true" default:"https://{{ .AccountName }}.blob.core.windows.net/"`
|
||||
DropboxToken string `split_words:"true"`
|
||||
DropboxRefreshToken string `split_words:"true"`
|
||||
DropboxAppKey string `split_words:"true"`
|
||||
DropboxAppSecret string `split_words:"true"`
|
||||
DropboxRemotePath string `split_words:"true"`
|
||||
DropboxConcurrencyLevel int `split_words:"true" default:"6"`
|
||||
}
|
||||
|
||||
@@ -220,9 +220,11 @@ func newScript() (*script, error) {
|
||||
s.storages = append(s.storages, azureBackend)
|
||||
}
|
||||
|
||||
if s.c.DropboxToken != "" {
|
||||
if s.c.DropboxRefreshToken != "" && s.c.DropboxAppKey != "" && s.c.DropboxAppSecret != "" {
|
||||
dropboxConfig := dropbox.Config{
|
||||
Token: s.c.DropboxToken,
|
||||
RefreshToken: s.c.DropboxRefreshToken,
|
||||
AppKey: s.c.DropboxAppKey,
|
||||
AppSecret: s.c.DropboxAppSecret,
|
||||
RemotePath: s.c.DropboxRemotePath,
|
||||
ConcurrencyLevel: s.c.DropboxConcurrencyLevel,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user