SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.
Go blob-storagecloud-drivedistributed-file-systemdistributed-storageerasure-codingfusehadoop-hdfshdfskuberneteslancelancedbobject-storageposixs3s3-storageseaweedfstiered-file-systemvector-search
break import cycle
Chris Lufce880308773
diff --git a/weed/filer/s3iam_conf_test.go b/weed/filer/s3iam_conf_test.goindex 88f446151b..65cc49840a 100644--- a/weed/filer/s3iam_conf_test.go+++ b/weed/filer/s3iam_conf_test.go@@ -2,7 +2,7 @@ package filerimport ("bytes"- "github.com/chrislusf/seaweedfs/weed/s3api"+ . "github.com/chrislusf/seaweedfs/weed/s3api/s3_constants""testing""github.com/chrislusf/seaweedfs/weed/pb/iam_pb"@@ -22,9 +22,9 @@ func TestS3Conf(t *testing.T) {},},Actions: []string{- s3api.ACTION_ADMIN,- s3api.ACTION_READ,- s3api.ACTION_WRITE,+ ACTION_ADMIN,+ ACTION_READ,+ ACTION_WRITE,},},{@@ -36,9 +36,9 @@ func TestS3Conf(t *testing.T) {},},Actions: []string{- s3api.ACTION_READ,- s3api.ACTION_TAGGING,- s3api.ACTION_LIST,+ ACTION_READ,+ ACTION_TAGGING,+ ACTION_LIST,},},},diff --git a/weed/s3api/auth_credentials.go b/weed/s3api/auth_credentials.goindex 452557619b..83f5269b79 100644--- a/weed/s3api/auth_credentials.go+++ b/weed/s3api/auth_credentials.go@@ -14,14 +14,6 @@ import (type Action string-const (- ACTION_READ = "Read"- ACTION_WRITE = "Write"- ACTION_ADMIN = "Admin"- ACTION_TAGGING = "Tagging"- ACTION_LIST = "List"-)-type Iam interface {Check(f http.HandlerFunc, actions ...Action) http.HandlerFunc}diff --git a/weed/s3api/auth_credentials_test.go b/weed/s3api/auth_credentials_test.goindex c6f76560c8..0383ddbcdd 100644--- a/weed/s3api/auth_credentials_test.go+++ b/weed/s3api/auth_credentials_test.go@@ -1,6 +1,7 @@package s3apiimport (+ . "github.com/chrislusf/seaweedfs/weed/s3api/s3_constants""testing""github.com/golang/protobuf/jsonpb"diff --git a/weed/s3api/s3_constants/s3_actions.go b/weed/s3api/s3_constants/s3_actions.gonew file mode 100644index 0000000000..f6056ef789--- /dev/null+++ b/weed/s3api/s3_constants/s3_actions.go@@ -0,0 +1,10 @@+package s3_constants++const (+ ACTION_READ = "Read"+ ACTION_WRITE = "Write"+ ACTION_ADMIN = "Admin"+ ACTION_TAGGING = "Tagging"+ ACTION_LIST = "List"+)+diff --git a/weed/s3api/s3api_server.go b/weed/s3api/s3api_server.goindex 18f8b563f1..93e2bb575e 100644--- a/weed/s3api/s3api_server.go+++ b/weed/s3api/s3api_server.go@@ -3,6 +3,7 @@ package s3apiimport ("fmt""github.com/chrislusf/seaweedfs/weed/filer"+ . "github.com/chrislusf/seaweedfs/weed/s3api/s3_constants""net/http""strings""time"