mirror of
https://github.com/offen/docker-volume-backup.git
synced 2025-12-06 09:38:01 +01:00
Scaffold Azure storage backend that does nothing yet
This commit is contained in:
@@ -15,6 +15,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/offen/docker-volume-backup/internal/storage"
|
||||
"github.com/offen/docker-volume-backup/internal/storage/azure"
|
||||
"github.com/offen/docker-volume-backup/internal/storage/local"
|
||||
"github.com/offen/docker-volume-backup/internal/storage/s3"
|
||||
"github.com/offen/docker-volume-backup/internal/storage/ssh"
|
||||
@@ -76,6 +77,7 @@ func newScript() (*script, error) {
|
||||
"WebDAV": {},
|
||||
"SSH": {},
|
||||
"Local": {},
|
||||
"Azure": {},
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -189,6 +191,19 @@ func newScript() (*script, error) {
|
||||
s.storages = append(s.storages, localBackend)
|
||||
}
|
||||
|
||||
if s.c.AzureStorageAccountName != "" {
|
||||
azureConfig := azure.Config{
|
||||
ContainerName: s.c.AzureStorageContainerName,
|
||||
AccountName: s.c.AzureStorageAccountName,
|
||||
PrimaryAccountKey: s.c.AzureStoragePrimaryAccountKey,
|
||||
}
|
||||
azureBackend, err := azure.NewStorageBackend(azureConfig, logFunc)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
s.storages = append(s.storages, azureBackend)
|
||||
}
|
||||
|
||||
if s.c.EmailNotificationRecipient != "" {
|
||||
emailURL := fmt.Sprintf(
|
||||
"smtp://%s:%s@%s:%d/?from=%s&to=%s",
|
||||
|
||||
Reference in New Issue
Block a user