From 3f65e61824f1e31c618272f5c45d06cab5e1f8ff Mon Sep 17 00:00:00 2001 From: kekskurse Date: Sat, 14 Oct 2023 15:13:04 +0200 Subject: [PATCH] Update s3 --- Readme.md | 7 ++++++- pkg/storage/s3.go | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Readme.md b/Readme.md index 36baee2..e59260b 100644 --- a/Readme.md +++ b/Readme.md @@ -54,7 +54,12 @@ issues: Config Parameter: -* +* prefix: Path/S3 Prefix to the Backups +* keyid: API Key Id +* secret: API Key Secret +* bucket: Name of the bucket +* endpoint: Endpoint +* region: Region ## Config diff --git a/pkg/storage/s3.go b/pkg/storage/s3.go index 3fa5ea1..fbbd69f 100644 --- a/pkg/storage/s3.go +++ b/pkg/storage/s3.go @@ -14,7 +14,7 @@ type S3FileSystem struct { func (l S3FileSystem) ListFiles() ([]File, error) { s3Config := &aws.Config{ - Credentials: credentials.NewStaticCredentials(l.Config["keyid"], l.Config["applicationkey"], ""), + Credentials: credentials.NewStaticCredentials(l.Config["keyid"], l.Config["secret"], ""), Endpoint: aws.String(l.Config["endpoint"]), Region: aws.String(l.Config["region"]), S3ForcePathStyle: aws.Bool(true), @@ -59,7 +59,7 @@ func (l S3FileSystem) ListFiles() ([]File, error) { func (I S3FileSystem) Delete(files []File) error { s3Config := &aws.Config{ - Credentials: credentials.NewStaticCredentials(I.Config["keyid"], I.Config["applicationkey"], ""), + Credentials: credentials.NewStaticCredentials(I.Config["keyid"], I.Config["secret"], ""), Endpoint: aws.String(I.Config["endpoint"]), Region: aws.String(I.Config["region"]), S3ForcePathStyle: aws.Bool(true),