mirror of
https://github.com/TecharoHQ/anubis.git
synced 2026-04-26 10:02:42 +00:00
fix(store/s3api): remove vestigal experiment
Signed-off-by: Xe Iaso <me@xeiaso.net>
This commit is contained in:
@@ -6,11 +6,10 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"strconv"
|
"strconv"
|
||||||
"time"
|
|
||||||
"strings"
|
"strings"
|
||||||
|
"time"
|
||||||
|
|
||||||
"github.com/TecharoHQ/anubis/lib/store"
|
"github.com/TecharoHQ/anubis/lib/store"
|
||||||
"github.com/aws/aws-sdk-go-v2/aws"
|
|
||||||
"github.com/aws/aws-sdk-go-v2/service/s3"
|
"github.com/aws/aws-sdk-go-v2/service/s3"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -19,21 +18,6 @@ type Store struct {
|
|||||||
bucket string
|
bucket string
|
||||||
}
|
}
|
||||||
|
|
||||||
// staticProvider is a minimal aws.CredentialsProvider implementation to avoid
|
|
||||||
// pulling a separate credentials module.
|
|
||||||
type staticProvider struct {
|
|
||||||
akid string
|
|
||||||
secret string
|
|
||||||
}
|
|
||||||
|
|
||||||
func (p staticProvider) Retrieve(ctx context.Context) (aws.Credentials, error) {
|
|
||||||
return aws.Credentials{
|
|
||||||
AccessKeyID: p.akid,
|
|
||||||
SecretAccessKey: p.secret,
|
|
||||||
Source: "static",
|
|
||||||
}, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *Store) Delete(ctx context.Context, key string) error {
|
func (s *Store) Delete(ctx context.Context, key string) error {
|
||||||
normKey := strings.ReplaceAll(key, ":", "/")
|
normKey := strings.ReplaceAll(key, ":", "/")
|
||||||
// Emulate not found by probing first.
|
// Emulate not found by probing first.
|
||||||
|
|||||||
Reference in New Issue
Block a user