aboutsummaryrefslogtreecommitdiff
path: root/weed/s3api
diff options
context:
space:
mode:
Diffstat (limited to 'weed/s3api')
-rw-r--r--weed/s3api/auth_credentials.go8
-rw-r--r--weed/s3api/auth_credentials_test.go1
-rw-r--r--weed/s3api/s3_constants/s3_actions.go10
-rw-r--r--weed/s3api/s3api_server.go1
4 files changed, 12 insertions, 8 deletions
diff --git a/weed/s3api/auth_credentials.go b/weed/s3api/auth_credentials.go
index 452557619..83f5269b7 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.go
index c6f76560c..0383ddbcd 100644
--- a/weed/s3api/auth_credentials_test.go
+++ b/weed/s3api/auth_credentials_test.go
@@ -1,6 +1,7 @@
package s3api
import (
+ . "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.go
new file mode 100644
index 000000000..f6056ef78
--- /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.go
index 18f8b563f..93e2bb575 100644
--- a/weed/s3api/s3api_server.go
+++ b/weed/s3api/s3api_server.go
@@ -3,6 +3,7 @@ package s3api
import (
"fmt"
"github.com/chrislusf/seaweedfs/weed/filer"
+ . "github.com/chrislusf/seaweedfs/weed/s3api/s3_constants"
"net/http"
"strings"
"time"