From 0cbebf0f573b975b66bf4f418b47a25c4c05d464 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Tue, 28 Jan 2020 03:42:34 +0530 Subject: [PATCH] Rename pkg/{tagging,lifecycle} to pkg/bucket sub-directory (#8892) Rename to allow for more such features to come in a more proper hierarchical manner. --- cmd/acl-handlers.go | 2 +- cmd/api-errors.go | 6 +++--- cmd/auth-handler.go | 2 +- cmd/bucket-handlers-listobjects.go | 2 +- cmd/bucket-handlers.go | 4 ++-- cmd/bucket-lifecycle-handler.go | 4 ++-- cmd/bucket-notification-handlers.go | 2 +- cmd/bucket-policy-handlers.go | 2 +- cmd/bucket-policy-handlers_test.go | 4 ++-- cmd/daily-lifecycle-ops.go | 2 +- cmd/disk-cache.go | 2 +- cmd/dummy-handlers.go | 4 ++-- cmd/fs-v1.go | 6 +++--- cmd/gateway-unsupported.go | 6 +++--- cmd/gateway/azure/gateway-azure.go | 4 ++-- cmd/gateway/b2/gateway-b2.go | 4 ++-- cmd/gateway/gcs/gateway-gcs.go | 4 ++-- cmd/gateway/oss/gateway-oss.go | 4 ++-- cmd/gateway/s3/gateway-s3.go | 2 +- cmd/globals.go | 2 +- cmd/handler-utils.go | 2 +- cmd/lifecycle.go | 2 +- cmd/notification.go | 6 +++--- cmd/object-api-interface.go | 6 +++--- cmd/object-handlers.go | 7 +++---- cmd/object-lock.go | 4 ++-- cmd/peer-rest-client.go | 6 +++--- cmd/peer-rest-server.go | 6 +++--- cmd/policy.go | 2 +- cmd/policy_test.go | 4 ++-- cmd/server_test.go | 2 +- cmd/test-utils_test.go | 2 +- cmd/web-handlers.go | 4 ++-- cmd/web-handlers_test.go | 4 ++-- cmd/xl-sets.go | 6 +++--- cmd/xl-v1-bucket.go | 4 ++-- cmd/xl-v1-object.go | 2 +- cmd/xl-zones.go | 6 +++--- go.mod | 4 ++-- go.sum | 18 ++++++++++-------- pkg/{ => bucket}/lifecycle/and.go | 0 pkg/{ => bucket}/lifecycle/expiration.go | 0 pkg/{ => bucket}/lifecycle/expiration_test.go | 0 pkg/{ => bucket}/lifecycle/filter.go | 0 pkg/{ => bucket}/lifecycle/filter_test.go | 0 pkg/{ => bucket}/lifecycle/lifecycle.go | 0 pkg/{ => bucket}/lifecycle/lifecycle_test.go | 0 .../lifecycle/noncurrentversion.go | 0 pkg/{ => bucket}/lifecycle/rule.go | 0 pkg/{ => bucket}/lifecycle/rule_test.go | 0 pkg/{ => bucket}/lifecycle/tag.go | 0 pkg/{ => bucket}/lifecycle/transition.go | 0 .../object/lock/lock.go} | 4 ++-- .../object/lock/lock_test.go} | 2 +- pkg/{ => bucket/object}/tagging/error.go | 0 pkg/{ => bucket/object}/tagging/tag.go | 0 pkg/{ => bucket/object}/tagging/tagging.go | 0 pkg/{ => bucket/object}/tagging/tagset.go | 0 pkg/{ => bucket}/policy/action.go | 2 +- pkg/{ => bucket}/policy/action_test.go | 0 pkg/{ => bucket}/policy/actionset.go | 0 pkg/{ => bucket}/policy/actionset_test.go | 0 .../policy/condition/binaryequalsfunc.go | 0 .../policy/condition/binaryequalsfunc_test.go | 0 pkg/{ => bucket}/policy/condition/boolfunc.go | 0 .../policy/condition/boolfunc_test.go | 0 pkg/{ => bucket}/policy/condition/func.go | 0 pkg/{ => bucket}/policy/condition/func_test.go | 0 .../policy/condition/ipaddressfunc.go | 0 .../policy/condition/ipaddressfunc_test.go | 0 pkg/{ => bucket}/policy/condition/key.go | 0 pkg/{ => bucket}/policy/condition/key_test.go | 0 pkg/{ => bucket}/policy/condition/name.go | 0 pkg/{ => bucket}/policy/condition/name_test.go | 0 pkg/{ => bucket}/policy/condition/nullfunc.go | 0 .../policy/condition/nullfunc_test.go | 0 .../policy/condition/stringequalsfunc.go | 0 .../policy/condition/stringequalsfunc_test.go | 0 .../condition/stringequalsignorecasefunc.go | 0 .../stringequalsignorecasefunc_test.go | 0 .../policy/condition/stringlikefunc.go | 0 .../policy/condition/stringlikefunc_test.go | 0 pkg/{ => bucket}/policy/condition/value.go | 0 .../policy/condition/value_test.go | 0 pkg/{ => bucket}/policy/condition/valueset.go | 0 .../policy/condition/valueset_test.go | 0 pkg/{ => bucket}/policy/effect.go | 0 pkg/{ => bucket}/policy/effect_test.go | 0 pkg/{ => bucket}/policy/error.go | 0 pkg/{ => bucket}/policy/id.go | 0 pkg/{ => bucket}/policy/id_test.go | 0 pkg/{ => bucket}/policy/policy.go | 0 pkg/{ => bucket}/policy/policy_test.go | 2 +- pkg/{ => bucket}/policy/principal.go | 0 pkg/{ => bucket}/policy/principal_test.go | 0 pkg/{ => bucket}/policy/resource.go | 2 +- pkg/{ => bucket}/policy/resource_test.go | 0 pkg/{ => bucket}/policy/resourceset.go | 0 pkg/{ => bucket}/policy/resourceset_test.go | 0 pkg/{ => bucket}/policy/statement.go | 2 +- pkg/{ => bucket}/policy/statement_test.go | 2 +- pkg/iam/policy/action.go | 2 +- pkg/iam/policy/admin-action.go | 2 +- pkg/iam/policy/constants.go | 2 +- pkg/iam/policy/policy.go | 2 +- pkg/iam/policy/policy_test.go | 4 ++-- pkg/iam/policy/resource.go | 2 +- pkg/iam/policy/statement.go | 4 ++-- pkg/iam/policy/statement_test.go | 4 ++-- 109 files changed, 102 insertions(+), 101 deletions(-) rename pkg/{ => bucket}/lifecycle/and.go (100%) rename pkg/{ => bucket}/lifecycle/expiration.go (100%) rename pkg/{ => bucket}/lifecycle/expiration_test.go (100%) rename pkg/{ => bucket}/lifecycle/filter.go (100%) rename pkg/{ => bucket}/lifecycle/filter_test.go (100%) rename pkg/{ => bucket}/lifecycle/lifecycle.go (100%) rename pkg/{ => bucket}/lifecycle/lifecycle_test.go (100%) rename pkg/{ => bucket}/lifecycle/noncurrentversion.go (100%) rename pkg/{ => bucket}/lifecycle/rule.go (100%) rename pkg/{ => bucket}/lifecycle/rule_test.go (100%) rename pkg/{ => bucket}/lifecycle/tag.go (100%) rename pkg/{ => bucket}/lifecycle/transition.go (100%) rename pkg/{objectlock/objectlock.go => bucket/object/lock/lock.go} (99%) rename pkg/{objectlock/objectlock_test.go => bucket/object/lock/lock_test.go} (99%) rename pkg/{ => bucket/object}/tagging/error.go (100%) rename pkg/{ => bucket/object}/tagging/tag.go (100%) rename pkg/{ => bucket/object}/tagging/tagging.go (100%) rename pkg/{ => bucket/object}/tagging/tagset.go (100%) rename pkg/{ => bucket}/policy/action.go (99%) rename pkg/{ => bucket}/policy/action_test.go (100%) rename pkg/{ => bucket}/policy/actionset.go (100%) rename pkg/{ => bucket}/policy/actionset_test.go (100%) rename pkg/{ => bucket}/policy/condition/binaryequalsfunc.go (100%) rename pkg/{ => bucket}/policy/condition/binaryequalsfunc_test.go (100%) rename pkg/{ => bucket}/policy/condition/boolfunc.go (100%) rename pkg/{ => bucket}/policy/condition/boolfunc_test.go (100%) rename pkg/{ => bucket}/policy/condition/func.go (100%) rename pkg/{ => bucket}/policy/condition/func_test.go (100%) rename pkg/{ => bucket}/policy/condition/ipaddressfunc.go (100%) rename pkg/{ => bucket}/policy/condition/ipaddressfunc_test.go (100%) rename pkg/{ => bucket}/policy/condition/key.go (100%) rename pkg/{ => bucket}/policy/condition/key_test.go (100%) rename pkg/{ => bucket}/policy/condition/name.go (100%) rename pkg/{ => bucket}/policy/condition/name_test.go (100%) rename pkg/{ => bucket}/policy/condition/nullfunc.go (100%) rename pkg/{ => bucket}/policy/condition/nullfunc_test.go (100%) rename pkg/{ => bucket}/policy/condition/stringequalsfunc.go (100%) rename pkg/{ => bucket}/policy/condition/stringequalsfunc_test.go (100%) rename pkg/{ => bucket}/policy/condition/stringequalsignorecasefunc.go (100%) rename pkg/{ => bucket}/policy/condition/stringequalsignorecasefunc_test.go (100%) rename pkg/{ => bucket}/policy/condition/stringlikefunc.go (100%) rename pkg/{ => bucket}/policy/condition/stringlikefunc_test.go (100%) rename pkg/{ => bucket}/policy/condition/value.go (100%) rename pkg/{ => bucket}/policy/condition/value_test.go (100%) rename pkg/{ => bucket}/policy/condition/valueset.go (100%) rename pkg/{ => bucket}/policy/condition/valueset_test.go (100%) rename pkg/{ => bucket}/policy/effect.go (100%) rename pkg/{ => bucket}/policy/effect_test.go (100%) rename pkg/{ => bucket}/policy/error.go (100%) rename pkg/{ => bucket}/policy/id.go (100%) rename pkg/{ => bucket}/policy/id_test.go (100%) rename pkg/{ => bucket}/policy/policy.go (100%) rename pkg/{ => bucket}/policy/policy_test.go (99%) rename pkg/{ => bucket}/policy/principal.go (100%) rename pkg/{ => bucket}/policy/principal_test.go (100%) rename pkg/{ => bucket}/policy/resource.go (98%) rename pkg/{ => bucket}/policy/resource_test.go (100%) rename pkg/{ => bucket}/policy/resourceset.go (100%) rename pkg/{ => bucket}/policy/resourceset_test.go (100%) rename pkg/{ => bucket}/policy/statement.go (98%) rename pkg/{ => bucket}/policy/statement_test.go (99%) diff --git a/cmd/acl-handlers.go b/cmd/acl-handlers.go index abe7e7818..9edfaa62f 100644 --- a/cmd/acl-handlers.go +++ b/cmd/acl-handlers.go @@ -22,7 +22,7 @@ import ( "github.com/gorilla/mux" "github.com/minio/minio/cmd/logger" - "github.com/minio/minio/pkg/policy" + "github.com/minio/minio/pkg/bucket/policy" ) // Data types used for returning dummy access control diff --git a/cmd/api-errors.go b/cmd/api-errors.go index fc316642e..0f17a1373 100644 --- a/cmd/api-errors.go +++ b/cmd/api-errors.go @@ -32,11 +32,11 @@ import ( "github.com/minio/minio/cmd/crypto" "github.com/minio/minio/cmd/logger" "github.com/minio/minio/pkg/auth" + objectlock "github.com/minio/minio/pkg/bucket/object/lock" + "github.com/minio/minio/pkg/bucket/object/tagging" + "github.com/minio/minio/pkg/bucket/policy" "github.com/minio/minio/pkg/event" "github.com/minio/minio/pkg/hash" - "github.com/minio/minio/pkg/objectlock" - "github.com/minio/minio/pkg/policy" - "github.com/minio/minio/pkg/tagging" ) // APIError structure diff --git a/cmd/auth-handler.go b/cmd/auth-handler.go index dc2745b60..6ba74d8a6 100644 --- a/cmd/auth-handler.go +++ b/cmd/auth-handler.go @@ -32,9 +32,9 @@ import ( xhttp "github.com/minio/minio/cmd/http" "github.com/minio/minio/cmd/logger" "github.com/minio/minio/pkg/auth" + "github.com/minio/minio/pkg/bucket/policy" "github.com/minio/minio/pkg/hash" iampolicy "github.com/minio/minio/pkg/iam/policy" - "github.com/minio/minio/pkg/policy" ) // Verify if request has JWT. diff --git a/cmd/bucket-handlers-listobjects.go b/cmd/bucket-handlers-listobjects.go index 6277109f0..8724fea94 100644 --- a/cmd/bucket-handlers-listobjects.go +++ b/cmd/bucket-handlers-listobjects.go @@ -24,7 +24,7 @@ import ( "github.com/minio/minio/cmd/crypto" "github.com/minio/minio/cmd/logger" - "github.com/minio/minio/pkg/policy" + "github.com/minio/minio/pkg/bucket/policy" ) // Validate all the ListObjects query arguments, returns an APIErrorCode diff --git a/cmd/bucket-handlers.go b/cmd/bucket-handlers.go index 74cefce4e..5bfc7d50b 100644 --- a/cmd/bucket-handlers.go +++ b/cmd/bucket-handlers.go @@ -36,12 +36,12 @@ import ( "github.com/minio/minio/cmd/crypto" xhttp "github.com/minio/minio/cmd/http" "github.com/minio/minio/cmd/logger" + objectlock "github.com/minio/minio/pkg/bucket/object/lock" + "github.com/minio/minio/pkg/bucket/policy" "github.com/minio/minio/pkg/event" "github.com/minio/minio/pkg/handlers" "github.com/minio/minio/pkg/hash" iampolicy "github.com/minio/minio/pkg/iam/policy" - "github.com/minio/minio/pkg/objectlock" - "github.com/minio/minio/pkg/policy" "github.com/minio/minio/pkg/sync/errgroup" ) diff --git a/cmd/bucket-lifecycle-handler.go b/cmd/bucket-lifecycle-handler.go index 72affda48..969dccd16 100644 --- a/cmd/bucket-lifecycle-handler.go +++ b/cmd/bucket-lifecycle-handler.go @@ -23,8 +23,8 @@ import ( "github.com/gorilla/mux" "github.com/minio/minio/cmd/logger" - "github.com/minio/minio/pkg/lifecycle" - "github.com/minio/minio/pkg/policy" + "github.com/minio/minio/pkg/bucket/lifecycle" + "github.com/minio/minio/pkg/bucket/policy" ) const ( diff --git a/cmd/bucket-notification-handlers.go b/cmd/bucket-notification-handlers.go index cfd83891e..d86d29ca3 100644 --- a/cmd/bucket-notification-handlers.go +++ b/cmd/bucket-notification-handlers.go @@ -30,8 +30,8 @@ import ( "github.com/gorilla/mux" xhttp "github.com/minio/minio/cmd/http" "github.com/minio/minio/cmd/logger" + "github.com/minio/minio/pkg/bucket/policy" "github.com/minio/minio/pkg/event" - "github.com/minio/minio/pkg/policy" ) const ( diff --git a/cmd/bucket-policy-handlers.go b/cmd/bucket-policy-handlers.go index 6a474d3b5..49516b39c 100644 --- a/cmd/bucket-policy-handlers.go +++ b/cmd/bucket-policy-handlers.go @@ -24,7 +24,7 @@ import ( humanize "github.com/dustin/go-humanize" "github.com/gorilla/mux" "github.com/minio/minio/cmd/logger" - "github.com/minio/minio/pkg/policy" + "github.com/minio/minio/pkg/bucket/policy" ) const ( diff --git a/cmd/bucket-policy-handlers_test.go b/cmd/bucket-policy-handlers_test.go index 1e3f1698a..055dc9ea2 100644 --- a/cmd/bucket-policy-handlers_test.go +++ b/cmd/bucket-policy-handlers_test.go @@ -29,8 +29,8 @@ import ( "testing" "github.com/minio/minio/pkg/auth" - "github.com/minio/minio/pkg/policy" - "github.com/minio/minio/pkg/policy/condition" + "github.com/minio/minio/pkg/bucket/policy" + "github.com/minio/minio/pkg/bucket/policy/condition" ) func getAnonReadOnlyBucketPolicy(bucketName string) *policy.Policy { diff --git a/cmd/daily-lifecycle-ops.go b/cmd/daily-lifecycle-ops.go index e29f2ddbf..9f2c9141b 100644 --- a/cmd/daily-lifecycle-ops.go +++ b/cmd/daily-lifecycle-ops.go @@ -21,8 +21,8 @@ import ( "time" "github.com/minio/minio/cmd/logger" + "github.com/minio/minio/pkg/bucket/lifecycle" "github.com/minio/minio/pkg/event" - "github.com/minio/minio/pkg/lifecycle" ) const ( diff --git a/cmd/disk-cache.go b/cmd/disk-cache.go index 3e42e3649..0b17785bf 100644 --- a/cmd/disk-cache.go +++ b/cmd/disk-cache.go @@ -31,8 +31,8 @@ import ( "github.com/djherbis/atime" "github.com/minio/minio/cmd/config/cache" "github.com/minio/minio/cmd/logger" + objectlock "github.com/minio/minio/pkg/bucket/object/lock" "github.com/minio/minio/pkg/color" - "github.com/minio/minio/pkg/objectlock" "github.com/minio/minio/pkg/sync/errgroup" "github.com/minio/minio/pkg/wildcard" ) diff --git a/cmd/dummy-handlers.go b/cmd/dummy-handlers.go index 28ae3d4b9..e7fbd5697 100644 --- a/cmd/dummy-handlers.go +++ b/cmd/dummy-handlers.go @@ -21,8 +21,8 @@ import ( "net/http" "github.com/gorilla/mux" - "github.com/minio/minio/pkg/policy" - "github.com/minio/minio/pkg/tagging" + "github.com/minio/minio/pkg/bucket/object/tagging" + "github.com/minio/minio/pkg/bucket/policy" ) // Data types used for returning dummy tagging XML. diff --git a/cmd/fs-v1.go b/cmd/fs-v1.go index 1daf966a7..9f6c7d9e0 100644 --- a/cmd/fs-v1.go +++ b/cmd/fs-v1.go @@ -38,13 +38,13 @@ import ( "github.com/minio/minio/cmd/config" xhttp "github.com/minio/minio/cmd/http" "github.com/minio/minio/cmd/logger" - "github.com/minio/minio/pkg/lifecycle" + "github.com/minio/minio/pkg/bucket/lifecycle" + "github.com/minio/minio/pkg/bucket/object/tagging" + "github.com/minio/minio/pkg/bucket/policy" "github.com/minio/minio/pkg/lock" "github.com/minio/minio/pkg/madmin" "github.com/minio/minio/pkg/mimedb" "github.com/minio/minio/pkg/mountinfo" - "github.com/minio/minio/pkg/policy" - "github.com/minio/minio/pkg/tagging" ) // Default etag is used for pre-existing objects. diff --git a/cmd/gateway-unsupported.go b/cmd/gateway-unsupported.go index 35a4d4251..b541bf2dc 100644 --- a/cmd/gateway-unsupported.go +++ b/cmd/gateway-unsupported.go @@ -21,10 +21,10 @@ import ( "errors" "github.com/minio/minio/cmd/logger" - "github.com/minio/minio/pkg/lifecycle" + "github.com/minio/minio/pkg/bucket/lifecycle" + "github.com/minio/minio/pkg/bucket/object/tagging" + "github.com/minio/minio/pkg/bucket/policy" "github.com/minio/minio/pkg/madmin" - "github.com/minio/minio/pkg/policy" - "github.com/minio/minio/pkg/tagging" ) // GatewayLocker implements custom NeNSLock implementation diff --git a/cmd/gateway/azure/gateway-azure.go b/cmd/gateway/azure/gateway-azure.go index e410c1921..d85fcda5f 100644 --- a/cmd/gateway/azure/gateway-azure.go +++ b/cmd/gateway/azure/gateway-azure.go @@ -42,8 +42,8 @@ import ( "github.com/minio/minio/cmd" "github.com/minio/minio/cmd/logger" "github.com/minio/minio/pkg/auth" - "github.com/minio/minio/pkg/policy" - "github.com/minio/minio/pkg/policy/condition" + "github.com/minio/minio/pkg/bucket/policy" + "github.com/minio/minio/pkg/bucket/policy/condition" sha256 "github.com/minio/sha256-simd" minio "github.com/minio/minio/cmd" diff --git a/cmd/gateway/b2/gateway-b2.go b/cmd/gateway/b2/gateway-b2.go index 5e9908b9a..fada82b00 100644 --- a/cmd/gateway/b2/gateway-b2.go +++ b/cmd/gateway/b2/gateway-b2.go @@ -33,9 +33,9 @@ import ( miniogopolicy "github.com/minio/minio-go/v6/pkg/policy" "github.com/minio/minio/cmd/logger" "github.com/minio/minio/pkg/auth" + "github.com/minio/minio/pkg/bucket/policy" + "github.com/minio/minio/pkg/bucket/policy/condition" h2 "github.com/minio/minio/pkg/hash" - "github.com/minio/minio/pkg/policy" - "github.com/minio/minio/pkg/policy/condition" minio "github.com/minio/minio/cmd" ) diff --git a/cmd/gateway/gcs/gateway-gcs.go b/cmd/gateway/gcs/gateway-gcs.go index 50e1244c1..5dc64f72c 100644 --- a/cmd/gateway/gcs/gateway-gcs.go +++ b/cmd/gateway/gcs/gateway-gcs.go @@ -41,9 +41,9 @@ import ( miniogopolicy "github.com/minio/minio-go/v6/pkg/policy" "github.com/minio/minio/cmd/logger" "github.com/minio/minio/pkg/auth" + "github.com/minio/minio/pkg/bucket/policy" + "github.com/minio/minio/pkg/bucket/policy/condition" "github.com/minio/minio/pkg/env" - "github.com/minio/minio/pkg/policy" - "github.com/minio/minio/pkg/policy/condition" "google.golang.org/api/googleapi" "google.golang.org/api/iterator" diff --git a/cmd/gateway/oss/gateway-oss.go b/cmd/gateway/oss/gateway-oss.go index cd6ec3b97..cad45da2b 100644 --- a/cmd/gateway/oss/gateway-oss.go +++ b/cmd/gateway/oss/gateway-oss.go @@ -35,9 +35,9 @@ import ( xhttp "github.com/minio/minio/cmd/http" "github.com/minio/minio/cmd/logger" "github.com/minio/minio/pkg/auth" + "github.com/minio/minio/pkg/bucket/policy" + "github.com/minio/minio/pkg/bucket/policy/condition" "github.com/minio/minio/pkg/hash" - "github.com/minio/minio/pkg/policy" - "github.com/minio/minio/pkg/policy/condition" ) const ( diff --git a/cmd/gateway/s3/gateway-s3.go b/cmd/gateway/s3/gateway-s3.go index 1b3d77e2e..8de7fb36f 100644 --- a/cmd/gateway/s3/gateway-s3.go +++ b/cmd/gateway/s3/gateway-s3.go @@ -35,7 +35,7 @@ import ( "github.com/minio/minio-go/v6/pkg/s3utils" "github.com/minio/minio/cmd/logger" "github.com/minio/minio/pkg/auth" - "github.com/minio/minio/pkg/policy" + "github.com/minio/minio/pkg/bucket/policy" ) const ( diff --git a/cmd/globals.go b/cmd/globals.go index 8170c7ead..6ba6d5cdd 100644 --- a/cmd/globals.go +++ b/cmd/globals.go @@ -35,9 +35,9 @@ import ( "github.com/minio/minio/cmd/crypto" xhttp "github.com/minio/minio/cmd/http" "github.com/minio/minio/pkg/auth" + objectlock "github.com/minio/minio/pkg/bucket/object/lock" "github.com/minio/minio/pkg/certs" "github.com/minio/minio/pkg/event" - "github.com/minio/minio/pkg/objectlock" "github.com/minio/minio/pkg/pubsub" ) diff --git a/cmd/handler-utils.go b/cmd/handler-utils.go index 945e77340..c67a20a14 100644 --- a/cmd/handler-utils.go +++ b/cmd/handler-utils.go @@ -32,9 +32,9 @@ import ( xhttp "github.com/minio/minio/cmd/http" "github.com/minio/minio/cmd/logger" "github.com/minio/minio/pkg/auth" + "github.com/minio/minio/pkg/bucket/object/tagging" "github.com/minio/minio/pkg/handlers" "github.com/minio/minio/pkg/madmin" - "github.com/minio/minio/pkg/tagging" ) const ( diff --git a/cmd/lifecycle.go b/cmd/lifecycle.go index b680c49e2..6ef8925f1 100644 --- a/cmd/lifecycle.go +++ b/cmd/lifecycle.go @@ -26,7 +26,7 @@ import ( "sync" "github.com/minio/minio/cmd/logger" - "github.com/minio/minio/pkg/lifecycle" + "github.com/minio/minio/pkg/bucket/lifecycle" ) const ( diff --git a/cmd/notification.go b/cmd/notification.go index 37fae67a4..42e16205d 100644 --- a/cmd/notification.go +++ b/cmd/notification.go @@ -32,12 +32,12 @@ import ( "github.com/klauspost/compress/zip" "github.com/minio/minio/cmd/crypto" "github.com/minio/minio/cmd/logger" + "github.com/minio/minio/pkg/bucket/lifecycle" + objectlock "github.com/minio/minio/pkg/bucket/object/lock" + "github.com/minio/minio/pkg/bucket/policy" "github.com/minio/minio/pkg/event" - "github.com/minio/minio/pkg/lifecycle" "github.com/minio/minio/pkg/madmin" xnet "github.com/minio/minio/pkg/net" - "github.com/minio/minio/pkg/objectlock" - "github.com/minio/minio/pkg/policy" "github.com/minio/minio/pkg/sync/errgroup" ) diff --git a/cmd/object-api-interface.go b/cmd/object-api-interface.go index d218fba30..6f9496c64 100644 --- a/cmd/object-api-interface.go +++ b/cmd/object-api-interface.go @@ -22,10 +22,10 @@ import ( "net/http" "github.com/minio/minio-go/v6/pkg/encrypt" - "github.com/minio/minio/pkg/lifecycle" + "github.com/minio/minio/pkg/bucket/lifecycle" + "github.com/minio/minio/pkg/bucket/object/tagging" + "github.com/minio/minio/pkg/bucket/policy" "github.com/minio/minio/pkg/madmin" - "github.com/minio/minio/pkg/policy" - "github.com/minio/minio/pkg/tagging" ) // CheckCopyPreconditionFn returns true if copy precondition check failed. diff --git a/cmd/object-handlers.go b/cmd/object-handlers.go index a31cc7b04..aefe1cd59 100644 --- a/cmd/object-handlers.go +++ b/cmd/object-handlers.go @@ -41,16 +41,15 @@ import ( "github.com/minio/minio/cmd/crypto" xhttp "github.com/minio/minio/cmd/http" "github.com/minio/minio/cmd/logger" + objectlock "github.com/minio/minio/pkg/bucket/object/lock" + "github.com/minio/minio/pkg/bucket/object/tagging" + "github.com/minio/minio/pkg/bucket/policy" "github.com/minio/minio/pkg/event" "github.com/minio/minio/pkg/handlers" "github.com/minio/minio/pkg/hash" - "github.com/minio/minio/pkg/objectlock" - iampolicy "github.com/minio/minio/pkg/iam/policy" "github.com/minio/minio/pkg/ioutil" - "github.com/minio/minio/pkg/policy" "github.com/minio/minio/pkg/s3select" - "github.com/minio/minio/pkg/tagging" sha256 "github.com/minio/sha256-simd" "github.com/minio/sio" ) diff --git a/cmd/object-lock.go b/cmd/object-lock.go index c1c5f23fb..159f601af 100644 --- a/cmd/object-lock.go +++ b/cmd/object-lock.go @@ -1,5 +1,5 @@ /* - * MinIO Cloud Storage, (C) 2016, 2017 MinIO, Inc. + * MinIO Cloud Storage, (C) 2019-2020 MinIO, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,7 +21,7 @@ import ( "net/http" "github.com/minio/minio/cmd/logger" - "github.com/minio/minio/pkg/objectlock" + objectlock "github.com/minio/minio/pkg/bucket/object/lock" ) // enforceRetentionBypassForDelete enforces whether an existing object under governance can be deleted diff --git a/cmd/peer-rest-client.go b/cmd/peer-rest-client.go index f482653ed..26a04a4cb 100644 --- a/cmd/peer-rest-client.go +++ b/cmd/peer-rest-client.go @@ -31,12 +31,12 @@ import ( "github.com/minio/minio/cmd/http" "github.com/minio/minio/cmd/logger" "github.com/minio/minio/cmd/rest" + "github.com/minio/minio/pkg/bucket/lifecycle" + objectlock "github.com/minio/minio/pkg/bucket/object/lock" + "github.com/minio/minio/pkg/bucket/policy" "github.com/minio/minio/pkg/event" - "github.com/minio/minio/pkg/lifecycle" "github.com/minio/minio/pkg/madmin" xnet "github.com/minio/minio/pkg/net" - "github.com/minio/minio/pkg/objectlock" - "github.com/minio/minio/pkg/policy" trace "github.com/minio/minio/pkg/trace" ) diff --git a/cmd/peer-rest-server.go b/cmd/peer-rest-server.go index e5823cdb9..ddc34f73b 100644 --- a/cmd/peer-rest-server.go +++ b/cmd/peer-rest-server.go @@ -31,10 +31,10 @@ import ( "github.com/gorilla/mux" "github.com/minio/minio/cmd/logger" + "github.com/minio/minio/pkg/bucket/lifecycle" + objectlock "github.com/minio/minio/pkg/bucket/object/lock" + "github.com/minio/minio/pkg/bucket/policy" "github.com/minio/minio/pkg/event" - "github.com/minio/minio/pkg/lifecycle" - objectlock "github.com/minio/minio/pkg/objectlock" - "github.com/minio/minio/pkg/policy" trace "github.com/minio/minio/pkg/trace" ) diff --git a/cmd/policy.go b/cmd/policy.go index cd32c875d..82bfc5dc9 100644 --- a/cmd/policy.go +++ b/cmd/policy.go @@ -29,9 +29,9 @@ import ( jsoniter "github.com/json-iterator/go" miniogopolicy "github.com/minio/minio-go/v6/pkg/policy" "github.com/minio/minio/cmd/logger" + "github.com/minio/minio/pkg/bucket/policy" "github.com/minio/minio/pkg/event" "github.com/minio/minio/pkg/handlers" - "github.com/minio/minio/pkg/policy" ) // PolicySys - policy subsystem. diff --git a/cmd/policy_test.go b/cmd/policy_test.go index b4f70cb14..487d6034a 100644 --- a/cmd/policy_test.go +++ b/cmd/policy_test.go @@ -22,8 +22,8 @@ import ( miniogopolicy "github.com/minio/minio-go/v6/pkg/policy" "github.com/minio/minio-go/v6/pkg/set" - "github.com/minio/minio/pkg/policy" - "github.com/minio/minio/pkg/policy/condition" + "github.com/minio/minio/pkg/bucket/policy" + "github.com/minio/minio/pkg/bucket/policy/condition" ) func TestPolicySysSet(t *testing.T) { diff --git a/cmd/server_test.go b/cmd/server_test.go index 9086ab0b6..2f1a861e1 100644 --- a/cmd/server_test.go +++ b/cmd/server_test.go @@ -35,7 +35,7 @@ import ( humanize "github.com/dustin/go-humanize" xhttp "github.com/minio/minio/cmd/http" - "github.com/minio/minio/pkg/policy" + "github.com/minio/minio/pkg/bucket/policy" ) // API suite container common to both FS and XL. diff --git a/cmd/test-utils_test.go b/cmd/test-utils_test.go index 0ac27e296..80e61149d 100644 --- a/cmd/test-utils_test.go +++ b/cmd/test-utils_test.go @@ -59,8 +59,8 @@ import ( "github.com/minio/minio/cmd/config" "github.com/minio/minio/cmd/logger" "github.com/minio/minio/pkg/auth" + "github.com/minio/minio/pkg/bucket/policy" "github.com/minio/minio/pkg/hash" - "github.com/minio/minio/pkg/policy" ) // Tests should initNSLock only once. diff --git a/cmd/web-handlers.go b/cmd/web-handlers.go index bb6f33505..5ccb015b6 100644 --- a/cmd/web-handlers.go +++ b/cmd/web-handlers.go @@ -45,13 +45,13 @@ import ( xhttp "github.com/minio/minio/cmd/http" "github.com/minio/minio/cmd/logger" "github.com/minio/minio/pkg/auth" + objectlock "github.com/minio/minio/pkg/bucket/object/lock" + "github.com/minio/minio/pkg/bucket/policy" "github.com/minio/minio/pkg/event" "github.com/minio/minio/pkg/handlers" "github.com/minio/minio/pkg/hash" iampolicy "github.com/minio/minio/pkg/iam/policy" "github.com/minio/minio/pkg/ioutil" - "github.com/minio/minio/pkg/objectlock" - "github.com/minio/minio/pkg/policy" ) // WebGenericArgs - empty struct for calls that don't accept arguments diff --git a/cmd/web-handlers_test.go b/cmd/web-handlers_test.go index 717161c09..c66611c60 100644 --- a/cmd/web-handlers_test.go +++ b/cmd/web-handlers_test.go @@ -37,10 +37,10 @@ import ( humanize "github.com/dustin/go-humanize" miniogopolicy "github.com/minio/minio-go/v6/pkg/policy" "github.com/minio/minio/pkg/auth" + "github.com/minio/minio/pkg/bucket/policy" + "github.com/minio/minio/pkg/bucket/policy/condition" "github.com/minio/minio/pkg/hash" "github.com/minio/minio/pkg/madmin" - "github.com/minio/minio/pkg/policy" - "github.com/minio/minio/pkg/policy/condition" ) // Implement a dummy flush writer. diff --git a/cmd/xl-sets.go b/cmd/xl-sets.go index ae8cafda9..84c2b07e0 100644 --- a/cmd/xl-sets.go +++ b/cmd/xl-sets.go @@ -30,12 +30,12 @@ import ( xhttp "github.com/minio/minio/cmd/http" "github.com/minio/minio/cmd/logger" "github.com/minio/minio/pkg/bpool" + "github.com/minio/minio/pkg/bucket/lifecycle" + "github.com/minio/minio/pkg/bucket/object/tagging" + "github.com/minio/minio/pkg/bucket/policy" "github.com/minio/minio/pkg/dsync" - "github.com/minio/minio/pkg/lifecycle" "github.com/minio/minio/pkg/madmin" - "github.com/minio/minio/pkg/policy" "github.com/minio/minio/pkg/sync/errgroup" - "github.com/minio/minio/pkg/tagging" ) // setsStorageAPI is encapsulated type for Close() diff --git a/cmd/xl-v1-bucket.go b/cmd/xl-v1-bucket.go index ffd203e24..0c599dc04 100644 --- a/cmd/xl-v1-bucket.go +++ b/cmd/xl-v1-bucket.go @@ -22,8 +22,8 @@ import ( "github.com/minio/minio-go/v6/pkg/s3utils" "github.com/minio/minio/cmd/logger" - "github.com/minio/minio/pkg/lifecycle" - "github.com/minio/minio/pkg/policy" + "github.com/minio/minio/pkg/bucket/lifecycle" + "github.com/minio/minio/pkg/bucket/policy" "github.com/minio/minio/pkg/sync/errgroup" ) diff --git a/cmd/xl-v1-object.go b/cmd/xl-v1-object.go index ed0ae577c..b53c44881 100644 --- a/cmd/xl-v1-object.go +++ b/cmd/xl-v1-object.go @@ -25,9 +25,9 @@ import ( xhttp "github.com/minio/minio/cmd/http" "github.com/minio/minio/cmd/logger" + "github.com/minio/minio/pkg/bucket/object/tagging" "github.com/minio/minio/pkg/mimedb" "github.com/minio/minio/pkg/sync/errgroup" - "github.com/minio/minio/pkg/tagging" ) // list all errors which can be ignored in object operations. diff --git a/cmd/xl-zones.go b/cmd/xl-zones.go index 8df299210..cf22f9bbe 100644 --- a/cmd/xl-zones.go +++ b/cmd/xl-zones.go @@ -27,11 +27,11 @@ import ( xhttp "github.com/minio/minio/cmd/http" "github.com/minio/minio/cmd/logger" - "github.com/minio/minio/pkg/lifecycle" + "github.com/minio/minio/pkg/bucket/lifecycle" + "github.com/minio/minio/pkg/bucket/object/tagging" + "github.com/minio/minio/pkg/bucket/policy" "github.com/minio/minio/pkg/madmin" - "github.com/minio/minio/pkg/policy" "github.com/minio/minio/pkg/sync/errgroup" - "github.com/minio/minio/pkg/tagging" ) type xlZones struct { diff --git a/go.mod b/go.mod index 5deef8655..48a319bfc 100644 --- a/go.mod +++ b/go.mod @@ -67,8 +67,8 @@ require ( github.com/minio/hdfs/v3 v3.0.1 github.com/minio/highwayhash v1.0.0 github.com/minio/lsync v1.0.1 - github.com/minio/minio-go/v6 v6.0.45-0.20200117140906-66cf57d21ba4 - github.com/minio/parquet-go v0.0.0-20191231003236-20b3c07bcd2c + github.com/minio/minio-go/v6 v6.0.45 + github.com/minio/parquet-go v0.0.0-20200125064549-a1e49702e174 github.com/minio/sha256-simd v0.1.1 github.com/minio/sio v0.2.0 github.com/mitchellh/go-homedir v1.1.0 diff --git a/go.sum b/go.sum index a7364159a..af6fd239c 100644 --- a/go.sum +++ b/go.sum @@ -4,8 +4,8 @@ cloud.google.com/go v0.39.0 h1:UgQP9na6OTfp4dsAiz/eFpFA1C6tPdH5wiRdi19tuMw= cloud.google.com/go v0.39.0/go.mod h1:rVLT6fkc8chs9sfPtFc1SBH6em7n+ZoXaG+87tDISts= contrib.go.opencensus.io/exporter/ocagent v0.5.0 h1:TKXjQSRS0/cCDrP7KvkgU6SmILtF/yV2TOs/02K/WZQ= contrib.go.opencensus.io/exporter/ocagent v0.5.0/go.mod h1:ImxhfLRpxoYiSq891pBrLVhN+qmP8BTVvdH2YLs7Gl0= -git.apache.org/thrift.git v0.12.0 h1:CMxsZlAmxKs+VAZMlDDL0wXciMblJcutQbEe3A9CYUM= -git.apache.org/thrift.git v0.12.0/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg= +git.apache.org/thrift.git v0.13.0 h1:/3bz5WZ+sqYArk7MBBBbDufMxKKOA56/6JO6psDpUDY= +git.apache.org/thrift.git v0.13.0/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg= github.com/Azure/azure-pipeline-go v0.2.1 h1:OLBdZJ3yvOn2MezlWvbrBMTEUQC72zAftRZOMdj5HYo= github.com/Azure/azure-pipeline-go v0.2.1/go.mod h1:UGSo8XybXnIGZ3epmeBw7Jdz+HiUVpqIlpz/HKHylF4= github.com/Azure/azure-storage-blob-go v0.8.0 h1:53qhf0Oxa0nOjgbDeeYPUeyiNmafAFEY95rZLK0Tj6o= @@ -92,6 +92,8 @@ github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8 github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/frankban/quicktest v1.4.1 h1:Wv2VwvNn73pAdFIVUQRXYDFp31lXKbqblIXo/Q5GPSg= github.com/frankban/quicktest v1.4.1/go.mod h1:36zfPVQyHxymz4cH7wlDmVwDrJuljRB60qkgn7rorfQ= +github.com/frankban/quicktest v1.7.2 h1:2QxQoC1TS09S7fhCPsrvqYdvP1H5M1P1ih5ABm3BTYk= +github.com/frankban/quicktest v1.7.2/go.mod h1:jaStnuzAqU1AJdCO0l53JDCJrVDKcS03DbaAcR7Ks/o= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.1-0.20190212211648-25d852aebe32 h1:Mn26/9ZMNWSw9C9ERFA1PUxfmGpolnw2v0bKOREu5ew= @@ -270,12 +272,10 @@ github.com/minio/highwayhash v1.0.0 h1:iMSDhgUILCr0TNm8LWlSjF8N0ZIj2qbO8WHp6Q/J2 github.com/minio/highwayhash v1.0.0/go.mod h1:xQboMTeM9nY9v/LlAOxFctujiv5+Aq2hR5dxBpaMbdc= github.com/minio/lsync v1.0.1 h1:AVvILxA976xc27hstd1oR+X9PQG0sPSom1MNb1ImfUs= github.com/minio/lsync v1.0.1/go.mod h1:tCFzfo0dlvdGl70IT4IAK/5Wtgb0/BrTmo/jE8pArKA= -github.com/minio/minio-go/v6 v6.0.44 h1:CVwVXw+uCOcyMi7GvcOhxE8WgV+Xj8Vkf2jItDf/EGI= -github.com/minio/minio-go/v6 v6.0.44/go.mod h1:qD0lajrGW49lKZLtXKtCB4X/qkMf0a5tBvN2PaZg7Gg= -github.com/minio/minio-go/v6 v6.0.45-0.20200117140906-66cf57d21ba4 h1:zjzoKgiRJm7k0J+IXz36u+ltbbU/iRTBlbm5/vZFt1w= -github.com/minio/minio-go/v6 v6.0.45-0.20200117140906-66cf57d21ba4/go.mod h1:qD0lajrGW49lKZLtXKtCB4X/qkMf0a5tBvN2PaZg7Gg= -github.com/minio/parquet-go v0.0.0-20191231003236-20b3c07bcd2c h1:PXr/55MEoFh0G6NeV0plWrdpTDr5xaDTxP3SpavSdGc= -github.com/minio/parquet-go v0.0.0-20191231003236-20b3c07bcd2c/go.mod h1:sl82d+TnCE7qeaNJazHdNoG9Gpyl9SZYfleDAQWrsls= +github.com/minio/minio-go/v6 v6.0.45 h1:aY4NI/DOgSbZiwGN3fEF4NAkC9An4bhaIWuJrQrRYew= +github.com/minio/minio-go/v6 v6.0.45/go.mod h1:qD0lajrGW49lKZLtXKtCB4X/qkMf0a5tBvN2PaZg7Gg= +github.com/minio/parquet-go v0.0.0-20200125064549-a1e49702e174 h1:WYFHZIJ5LTWd4C3CW26jguaBLLDdX7l1/Xa3QSKGkIc= +github.com/minio/parquet-go v0.0.0-20200125064549-a1e49702e174/go.mod h1:PXYM9yI2l0YPmxHUXe6mFTmkQcyaVasDshAPTbGpDoo= github.com/minio/sha256-simd v0.1.1 h1:5QHSlgo3nt5yKOJrC7W8w7X+NFl8cMPZm96iu8kKUJU= github.com/minio/sha256-simd v0.1.1/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM= github.com/minio/sio v0.2.0 h1:NCRCFLx0r5pRbXf65LVNjxbCGZgNQvNFQkgX3XF4BoA= @@ -337,6 +337,8 @@ github.com/pierrec/lz4 v2.0.5+incompatible h1:2xWsjqPFWcplujydGg4WmhC/6fZqK42wMM github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pierrec/lz4 v2.2.6+incompatible h1:6aCX4/YZ9v8q69hTyiR7dNLnTA3fgtKHVVW5BCd5Znw= github.com/pierrec/lz4 v2.2.6+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pierrec/lz4 v2.4.0+incompatible h1:06usnXXDNcPvCHDkmPpkidf4jTc52UKld7UPfqKatY4= +github.com/pierrec/lz4 v2.4.0+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= diff --git a/pkg/lifecycle/and.go b/pkg/bucket/lifecycle/and.go similarity index 100% rename from pkg/lifecycle/and.go rename to pkg/bucket/lifecycle/and.go diff --git a/pkg/lifecycle/expiration.go b/pkg/bucket/lifecycle/expiration.go similarity index 100% rename from pkg/lifecycle/expiration.go rename to pkg/bucket/lifecycle/expiration.go diff --git a/pkg/lifecycle/expiration_test.go b/pkg/bucket/lifecycle/expiration_test.go similarity index 100% rename from pkg/lifecycle/expiration_test.go rename to pkg/bucket/lifecycle/expiration_test.go diff --git a/pkg/lifecycle/filter.go b/pkg/bucket/lifecycle/filter.go similarity index 100% rename from pkg/lifecycle/filter.go rename to pkg/bucket/lifecycle/filter.go diff --git a/pkg/lifecycle/filter_test.go b/pkg/bucket/lifecycle/filter_test.go similarity index 100% rename from pkg/lifecycle/filter_test.go rename to pkg/bucket/lifecycle/filter_test.go diff --git a/pkg/lifecycle/lifecycle.go b/pkg/bucket/lifecycle/lifecycle.go similarity index 100% rename from pkg/lifecycle/lifecycle.go rename to pkg/bucket/lifecycle/lifecycle.go diff --git a/pkg/lifecycle/lifecycle_test.go b/pkg/bucket/lifecycle/lifecycle_test.go similarity index 100% rename from pkg/lifecycle/lifecycle_test.go rename to pkg/bucket/lifecycle/lifecycle_test.go diff --git a/pkg/lifecycle/noncurrentversion.go b/pkg/bucket/lifecycle/noncurrentversion.go similarity index 100% rename from pkg/lifecycle/noncurrentversion.go rename to pkg/bucket/lifecycle/noncurrentversion.go diff --git a/pkg/lifecycle/rule.go b/pkg/bucket/lifecycle/rule.go similarity index 100% rename from pkg/lifecycle/rule.go rename to pkg/bucket/lifecycle/rule.go diff --git a/pkg/lifecycle/rule_test.go b/pkg/bucket/lifecycle/rule_test.go similarity index 100% rename from pkg/lifecycle/rule_test.go rename to pkg/bucket/lifecycle/rule_test.go diff --git a/pkg/lifecycle/tag.go b/pkg/bucket/lifecycle/tag.go similarity index 100% rename from pkg/lifecycle/tag.go rename to pkg/bucket/lifecycle/tag.go diff --git a/pkg/lifecycle/transition.go b/pkg/bucket/lifecycle/transition.go similarity index 100% rename from pkg/lifecycle/transition.go rename to pkg/bucket/lifecycle/transition.go diff --git a/pkg/objectlock/objectlock.go b/pkg/bucket/object/lock/lock.go similarity index 99% rename from pkg/objectlock/objectlock.go rename to pkg/bucket/object/lock/lock.go index 08255f7ec..ec19c0321 100644 --- a/pkg/objectlock/objectlock.go +++ b/pkg/bucket/object/lock/lock.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package objectlock +package lock import ( "context" @@ -292,7 +292,7 @@ func ParseObjectLockConfig(reader io.Reader) (*Config, error) { return &config, nil } -// NewObjectLockConfig returns a initialized objectlock.Config struct +// NewObjectLockConfig returns a initialized lock.Config struct func NewObjectLockConfig() *Config { return &Config{ ObjectLockEnabled: "Enabled", diff --git a/pkg/objectlock/objectlock_test.go b/pkg/bucket/object/lock/lock_test.go similarity index 99% rename from pkg/objectlock/objectlock_test.go rename to pkg/bucket/object/lock/lock_test.go index 7bde930a3..cd30abbd7 100644 --- a/pkg/objectlock/objectlock_test.go +++ b/pkg/bucket/object/lock/lock_test.go @@ -14,7 +14,7 @@ * limitations under the License. */ -package objectlock +package lock import ( "encoding/xml" diff --git a/pkg/tagging/error.go b/pkg/bucket/object/tagging/error.go similarity index 100% rename from pkg/tagging/error.go rename to pkg/bucket/object/tagging/error.go diff --git a/pkg/tagging/tag.go b/pkg/bucket/object/tagging/tag.go similarity index 100% rename from pkg/tagging/tag.go rename to pkg/bucket/object/tagging/tag.go diff --git a/pkg/tagging/tagging.go b/pkg/bucket/object/tagging/tagging.go similarity index 100% rename from pkg/tagging/tagging.go rename to pkg/bucket/object/tagging/tagging.go diff --git a/pkg/tagging/tagset.go b/pkg/bucket/object/tagging/tagset.go similarity index 100% rename from pkg/tagging/tagset.go rename to pkg/bucket/object/tagging/tagset.go diff --git a/pkg/policy/action.go b/pkg/bucket/policy/action.go similarity index 99% rename from pkg/policy/action.go rename to pkg/bucket/policy/action.go index bc4983481..5e51e280d 100644 --- a/pkg/policy/action.go +++ b/pkg/bucket/policy/action.go @@ -19,7 +19,7 @@ package policy import ( "encoding/json" - "github.com/minio/minio/pkg/policy/condition" + "github.com/minio/minio/pkg/bucket/policy/condition" ) // Action - policy action. diff --git a/pkg/policy/action_test.go b/pkg/bucket/policy/action_test.go similarity index 100% rename from pkg/policy/action_test.go rename to pkg/bucket/policy/action_test.go diff --git a/pkg/policy/actionset.go b/pkg/bucket/policy/actionset.go similarity index 100% rename from pkg/policy/actionset.go rename to pkg/bucket/policy/actionset.go diff --git a/pkg/policy/actionset_test.go b/pkg/bucket/policy/actionset_test.go similarity index 100% rename from pkg/policy/actionset_test.go rename to pkg/bucket/policy/actionset_test.go diff --git a/pkg/policy/condition/binaryequalsfunc.go b/pkg/bucket/policy/condition/binaryequalsfunc.go similarity index 100% rename from pkg/policy/condition/binaryequalsfunc.go rename to pkg/bucket/policy/condition/binaryequalsfunc.go diff --git a/pkg/policy/condition/binaryequalsfunc_test.go b/pkg/bucket/policy/condition/binaryequalsfunc_test.go similarity index 100% rename from pkg/policy/condition/binaryequalsfunc_test.go rename to pkg/bucket/policy/condition/binaryequalsfunc_test.go diff --git a/pkg/policy/condition/boolfunc.go b/pkg/bucket/policy/condition/boolfunc.go similarity index 100% rename from pkg/policy/condition/boolfunc.go rename to pkg/bucket/policy/condition/boolfunc.go diff --git a/pkg/policy/condition/boolfunc_test.go b/pkg/bucket/policy/condition/boolfunc_test.go similarity index 100% rename from pkg/policy/condition/boolfunc_test.go rename to pkg/bucket/policy/condition/boolfunc_test.go diff --git a/pkg/policy/condition/func.go b/pkg/bucket/policy/condition/func.go similarity index 100% rename from pkg/policy/condition/func.go rename to pkg/bucket/policy/condition/func.go diff --git a/pkg/policy/condition/func_test.go b/pkg/bucket/policy/condition/func_test.go similarity index 100% rename from pkg/policy/condition/func_test.go rename to pkg/bucket/policy/condition/func_test.go diff --git a/pkg/policy/condition/ipaddressfunc.go b/pkg/bucket/policy/condition/ipaddressfunc.go similarity index 100% rename from pkg/policy/condition/ipaddressfunc.go rename to pkg/bucket/policy/condition/ipaddressfunc.go diff --git a/pkg/policy/condition/ipaddressfunc_test.go b/pkg/bucket/policy/condition/ipaddressfunc_test.go similarity index 100% rename from pkg/policy/condition/ipaddressfunc_test.go rename to pkg/bucket/policy/condition/ipaddressfunc_test.go diff --git a/pkg/policy/condition/key.go b/pkg/bucket/policy/condition/key.go similarity index 100% rename from pkg/policy/condition/key.go rename to pkg/bucket/policy/condition/key.go diff --git a/pkg/policy/condition/key_test.go b/pkg/bucket/policy/condition/key_test.go similarity index 100% rename from pkg/policy/condition/key_test.go rename to pkg/bucket/policy/condition/key_test.go diff --git a/pkg/policy/condition/name.go b/pkg/bucket/policy/condition/name.go similarity index 100% rename from pkg/policy/condition/name.go rename to pkg/bucket/policy/condition/name.go diff --git a/pkg/policy/condition/name_test.go b/pkg/bucket/policy/condition/name_test.go similarity index 100% rename from pkg/policy/condition/name_test.go rename to pkg/bucket/policy/condition/name_test.go diff --git a/pkg/policy/condition/nullfunc.go b/pkg/bucket/policy/condition/nullfunc.go similarity index 100% rename from pkg/policy/condition/nullfunc.go rename to pkg/bucket/policy/condition/nullfunc.go diff --git a/pkg/policy/condition/nullfunc_test.go b/pkg/bucket/policy/condition/nullfunc_test.go similarity index 100% rename from pkg/policy/condition/nullfunc_test.go rename to pkg/bucket/policy/condition/nullfunc_test.go diff --git a/pkg/policy/condition/stringequalsfunc.go b/pkg/bucket/policy/condition/stringequalsfunc.go similarity index 100% rename from pkg/policy/condition/stringequalsfunc.go rename to pkg/bucket/policy/condition/stringequalsfunc.go diff --git a/pkg/policy/condition/stringequalsfunc_test.go b/pkg/bucket/policy/condition/stringequalsfunc_test.go similarity index 100% rename from pkg/policy/condition/stringequalsfunc_test.go rename to pkg/bucket/policy/condition/stringequalsfunc_test.go diff --git a/pkg/policy/condition/stringequalsignorecasefunc.go b/pkg/bucket/policy/condition/stringequalsignorecasefunc.go similarity index 100% rename from pkg/policy/condition/stringequalsignorecasefunc.go rename to pkg/bucket/policy/condition/stringequalsignorecasefunc.go diff --git a/pkg/policy/condition/stringequalsignorecasefunc_test.go b/pkg/bucket/policy/condition/stringequalsignorecasefunc_test.go similarity index 100% rename from pkg/policy/condition/stringequalsignorecasefunc_test.go rename to pkg/bucket/policy/condition/stringequalsignorecasefunc_test.go diff --git a/pkg/policy/condition/stringlikefunc.go b/pkg/bucket/policy/condition/stringlikefunc.go similarity index 100% rename from pkg/policy/condition/stringlikefunc.go rename to pkg/bucket/policy/condition/stringlikefunc.go diff --git a/pkg/policy/condition/stringlikefunc_test.go b/pkg/bucket/policy/condition/stringlikefunc_test.go similarity index 100% rename from pkg/policy/condition/stringlikefunc_test.go rename to pkg/bucket/policy/condition/stringlikefunc_test.go diff --git a/pkg/policy/condition/value.go b/pkg/bucket/policy/condition/value.go similarity index 100% rename from pkg/policy/condition/value.go rename to pkg/bucket/policy/condition/value.go diff --git a/pkg/policy/condition/value_test.go b/pkg/bucket/policy/condition/value_test.go similarity index 100% rename from pkg/policy/condition/value_test.go rename to pkg/bucket/policy/condition/value_test.go diff --git a/pkg/policy/condition/valueset.go b/pkg/bucket/policy/condition/valueset.go similarity index 100% rename from pkg/policy/condition/valueset.go rename to pkg/bucket/policy/condition/valueset.go diff --git a/pkg/policy/condition/valueset_test.go b/pkg/bucket/policy/condition/valueset_test.go similarity index 100% rename from pkg/policy/condition/valueset_test.go rename to pkg/bucket/policy/condition/valueset_test.go diff --git a/pkg/policy/effect.go b/pkg/bucket/policy/effect.go similarity index 100% rename from pkg/policy/effect.go rename to pkg/bucket/policy/effect.go diff --git a/pkg/policy/effect_test.go b/pkg/bucket/policy/effect_test.go similarity index 100% rename from pkg/policy/effect_test.go rename to pkg/bucket/policy/effect_test.go diff --git a/pkg/policy/error.go b/pkg/bucket/policy/error.go similarity index 100% rename from pkg/policy/error.go rename to pkg/bucket/policy/error.go diff --git a/pkg/policy/id.go b/pkg/bucket/policy/id.go similarity index 100% rename from pkg/policy/id.go rename to pkg/bucket/policy/id.go diff --git a/pkg/policy/id_test.go b/pkg/bucket/policy/id_test.go similarity index 100% rename from pkg/policy/id_test.go rename to pkg/bucket/policy/id_test.go diff --git a/pkg/policy/policy.go b/pkg/bucket/policy/policy.go similarity index 100% rename from pkg/policy/policy.go rename to pkg/bucket/policy/policy.go diff --git a/pkg/policy/policy_test.go b/pkg/bucket/policy/policy_test.go similarity index 99% rename from pkg/policy/policy_test.go rename to pkg/bucket/policy/policy_test.go index e5312f7ad..6f4e3dd2b 100644 --- a/pkg/policy/policy_test.go +++ b/pkg/bucket/policy/policy_test.go @@ -22,7 +22,7 @@ import ( "reflect" "testing" - "github.com/minio/minio/pkg/policy/condition" + "github.com/minio/minio/pkg/bucket/policy/condition" ) func TestPolicyIsAllowed(t *testing.T) { diff --git a/pkg/policy/principal.go b/pkg/bucket/policy/principal.go similarity index 100% rename from pkg/policy/principal.go rename to pkg/bucket/policy/principal.go diff --git a/pkg/policy/principal_test.go b/pkg/bucket/policy/principal_test.go similarity index 100% rename from pkg/policy/principal_test.go rename to pkg/bucket/policy/principal_test.go diff --git a/pkg/policy/resource.go b/pkg/bucket/policy/resource.go similarity index 98% rename from pkg/policy/resource.go rename to pkg/bucket/policy/resource.go index a6bc07ce5..ca892f460 100644 --- a/pkg/policy/resource.go +++ b/pkg/bucket/policy/resource.go @@ -20,7 +20,7 @@ import ( "encoding/json" "strings" - "github.com/minio/minio/pkg/policy/condition" + "github.com/minio/minio/pkg/bucket/policy/condition" "github.com/minio/minio/pkg/wildcard" ) diff --git a/pkg/policy/resource_test.go b/pkg/bucket/policy/resource_test.go similarity index 100% rename from pkg/policy/resource_test.go rename to pkg/bucket/policy/resource_test.go diff --git a/pkg/policy/resourceset.go b/pkg/bucket/policy/resourceset.go similarity index 100% rename from pkg/policy/resourceset.go rename to pkg/bucket/policy/resourceset.go diff --git a/pkg/policy/resourceset_test.go b/pkg/bucket/policy/resourceset_test.go similarity index 100% rename from pkg/policy/resourceset_test.go rename to pkg/bucket/policy/resourceset_test.go diff --git a/pkg/policy/statement.go b/pkg/bucket/policy/statement.go similarity index 98% rename from pkg/policy/statement.go rename to pkg/bucket/policy/statement.go index 7f6faf3cd..5b34f98af 100644 --- a/pkg/policy/statement.go +++ b/pkg/bucket/policy/statement.go @@ -20,7 +20,7 @@ import ( "encoding/json" "strings" - "github.com/minio/minio/pkg/policy/condition" + "github.com/minio/minio/pkg/bucket/policy/condition" ) // Statement - policy statement. diff --git a/pkg/policy/statement_test.go b/pkg/bucket/policy/statement_test.go similarity index 99% rename from pkg/policy/statement_test.go rename to pkg/bucket/policy/statement_test.go index 77a083d81..c53d7b82e 100644 --- a/pkg/policy/statement_test.go +++ b/pkg/bucket/policy/statement_test.go @@ -22,7 +22,7 @@ import ( "reflect" "testing" - "github.com/minio/minio/pkg/policy/condition" + "github.com/minio/minio/pkg/bucket/policy/condition" ) func TestStatementIsAllowed(t *testing.T) { diff --git a/pkg/iam/policy/action.go b/pkg/iam/policy/action.go index 4cbeb4ed1..31759e26b 100644 --- a/pkg/iam/policy/action.go +++ b/pkg/iam/policy/action.go @@ -19,7 +19,7 @@ package iampolicy import ( "encoding/json" - "github.com/minio/minio/pkg/policy/condition" + "github.com/minio/minio/pkg/bucket/policy/condition" "github.com/minio/minio/pkg/wildcard" ) diff --git a/pkg/iam/policy/admin-action.go b/pkg/iam/policy/admin-action.go index 7ee6d50ea..6f8af81ac 100644 --- a/pkg/iam/policy/admin-action.go +++ b/pkg/iam/policy/admin-action.go @@ -17,7 +17,7 @@ package iampolicy import ( - "github.com/minio/minio/pkg/policy/condition" + "github.com/minio/minio/pkg/bucket/policy/condition" ) // AdminAction - admin policy action. diff --git a/pkg/iam/policy/constants.go b/pkg/iam/policy/constants.go index 12babad09..2e064e659 100644 --- a/pkg/iam/policy/constants.go +++ b/pkg/iam/policy/constants.go @@ -17,7 +17,7 @@ package iampolicy import ( - "github.com/minio/minio/pkg/policy" + "github.com/minio/minio/pkg/bucket/policy" ) // Policy claim constants diff --git a/pkg/iam/policy/policy.go b/pkg/iam/policy/policy.go index 9f679a1f6..ddb700912 100644 --- a/pkg/iam/policy/policy.go +++ b/pkg/iam/policy/policy.go @@ -21,7 +21,7 @@ import ( "io" "strings" - "github.com/minio/minio/pkg/policy" + "github.com/minio/minio/pkg/bucket/policy" ) // DefaultVersion - default policy version as per AWS S3 specification. diff --git a/pkg/iam/policy/policy_test.go b/pkg/iam/policy/policy_test.go index 806dbc6ef..53afa5163 100644 --- a/pkg/iam/policy/policy_test.go +++ b/pkg/iam/policy/policy_test.go @@ -22,8 +22,8 @@ import ( "reflect" "testing" - "github.com/minio/minio/pkg/policy" - "github.com/minio/minio/pkg/policy/condition" + "github.com/minio/minio/pkg/bucket/policy" + "github.com/minio/minio/pkg/bucket/policy/condition" ) func TestPolicyIsAllowed(t *testing.T) { diff --git a/pkg/iam/policy/resource.go b/pkg/iam/policy/resource.go index 346abaf08..efccfd8b0 100644 --- a/pkg/iam/policy/resource.go +++ b/pkg/iam/policy/resource.go @@ -21,7 +21,7 @@ import ( "path" "strings" - "github.com/minio/minio/pkg/policy/condition" + "github.com/minio/minio/pkg/bucket/policy/condition" "github.com/minio/minio/pkg/wildcard" ) diff --git a/pkg/iam/policy/statement.go b/pkg/iam/policy/statement.go index c89c84dfc..2ca0bc3d4 100644 --- a/pkg/iam/policy/statement.go +++ b/pkg/iam/policy/statement.go @@ -20,8 +20,8 @@ import ( "encoding/json" "strings" - "github.com/minio/minio/pkg/policy" - "github.com/minio/minio/pkg/policy/condition" + "github.com/minio/minio/pkg/bucket/policy" + "github.com/minio/minio/pkg/bucket/policy/condition" ) // Statement - iam policy statement. diff --git a/pkg/iam/policy/statement_test.go b/pkg/iam/policy/statement_test.go index 76f0eff40..71b19eab1 100644 --- a/pkg/iam/policy/statement_test.go +++ b/pkg/iam/policy/statement_test.go @@ -22,8 +22,8 @@ import ( "reflect" "testing" - "github.com/minio/minio/pkg/policy" - "github.com/minio/minio/pkg/policy/condition" + "github.com/minio/minio/pkg/bucket/policy" + "github.com/minio/minio/pkg/bucket/policy/condition" ) func TestStatementIsAllowed(t *testing.T) {