mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
break import cycle
This commit is contained in:
parent
606051cc79
commit
fce8803087
|
@ -2,7 +2,7 @@ package filer
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"github.com/chrislusf/seaweedfs/weed/s3api"
|
. "github.com/chrislusf/seaweedfs/weed/s3api/s3_constants"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/chrislusf/seaweedfs/weed/pb/iam_pb"
|
"github.com/chrislusf/seaweedfs/weed/pb/iam_pb"
|
||||||
|
@ -22,9 +22,9 @@ func TestS3Conf(t *testing.T) {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Actions: []string{
|
Actions: []string{
|
||||||
s3api.ACTION_ADMIN,
|
ACTION_ADMIN,
|
||||||
s3api.ACTION_READ,
|
ACTION_READ,
|
||||||
s3api.ACTION_WRITE,
|
ACTION_WRITE,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -36,9 +36,9 @@ func TestS3Conf(t *testing.T) {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Actions: []string{
|
Actions: []string{
|
||||||
s3api.ACTION_READ,
|
ACTION_READ,
|
||||||
s3api.ACTION_TAGGING,
|
ACTION_TAGGING,
|
||||||
s3api.ACTION_LIST,
|
ACTION_LIST,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -14,14 +14,6 @@ import (
|
||||||
|
|
||||||
type Action string
|
type Action string
|
||||||
|
|
||||||
const (
|
|
||||||
ACTION_READ = "Read"
|
|
||||||
ACTION_WRITE = "Write"
|
|
||||||
ACTION_ADMIN = "Admin"
|
|
||||||
ACTION_TAGGING = "Tagging"
|
|
||||||
ACTION_LIST = "List"
|
|
||||||
)
|
|
||||||
|
|
||||||
type Iam interface {
|
type Iam interface {
|
||||||
Check(f http.HandlerFunc, actions ...Action) http.HandlerFunc
|
Check(f http.HandlerFunc, actions ...Action) http.HandlerFunc
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package s3api
|
package s3api
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
. "github.com/chrislusf/seaweedfs/weed/s3api/s3_constants"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/golang/protobuf/jsonpb"
|
"github.com/golang/protobuf/jsonpb"
|
||||||
|
|
10
weed/s3api/s3_constants/s3_actions.go
Normal file
10
weed/s3api/s3_constants/s3_actions.go
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
package s3_constants
|
||||||
|
|
||||||
|
const (
|
||||||
|
ACTION_READ = "Read"
|
||||||
|
ACTION_WRITE = "Write"
|
||||||
|
ACTION_ADMIN = "Admin"
|
||||||
|
ACTION_TAGGING = "Tagging"
|
||||||
|
ACTION_LIST = "List"
|
||||||
|
)
|
||||||
|
|
|
@ -3,6 +3,7 @@ package s3api
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/chrislusf/seaweedfs/weed/filer"
|
"github.com/chrislusf/seaweedfs/weed/filer"
|
||||||
|
. "github.com/chrislusf/seaweedfs/weed/s3api/s3_constants"
|
||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
Loading…
Reference in a new issue