@ -20,8 +20,6 @@ import (
"net/http"
"github.com/gorilla/mux"
"github.com/minio/minio/cmd/config"
"github.com/minio/minio/pkg/env"
"github.com/minio/minio/pkg/madmin"
)
@ -172,27 +170,25 @@ func registerAdminRouter(router *mux.Router, enableConfigOps, enableIAMOps bool)
}
if globalIsDistErasure || globalIsErasure {
// Quota operations
if env . Get ( envDataUsageCrawlConf , config . EnableOn ) == config . EnableOn {
// GetBucketQuotaConfig
adminRouter . Methods ( http . MethodGet ) . Path ( adminVersion + "/get-bucket-quota" ) . HandlerFunc (
httpTraceHdrs ( adminAPI . GetBucketQuotaConfigHandler ) ) . Queries ( "bucket" , "{bucket:.*}" )
// PutBucketQuotaConfig
adminRouter . Methods ( http . MethodPut ) . Path ( adminVersion + "/set-bucket-quota" ) . HandlerFunc (
httpTraceHdrs ( adminAPI . PutBucketQuotaConfigHandler ) ) . Queries ( "bucket" , "{bucket:.*}" )
// Bucket replication operations
// GetBucketTargetHandler
adminRouter . Methods ( http . MethodGet ) . Path ( adminVersion + "/list-remote-targets" ) . HandlerFunc (
httpTraceHdrs ( adminAPI . ListRemoteTargetsHandler ) ) . Queries ( "bucket" , "{bucket:.*}" , "type" , "{type:.*}" )
// SetRemoteTargetHandler
adminRouter . Methods ( http . MethodPut ) . Path ( adminVersion + "/set-remote-target" ) . HandlerFunc (
httpTraceHdrs ( adminAPI . SetRemoteTargetHandler ) ) . Queries ( "bucket" , "{bucket:.*}" )
// RemoveRemoteTargetHandler
adminRouter . Methods ( http . MethodDelete ) . Path ( adminVersion + "/remove-remote-target" ) . HandlerFunc (
httpTraceHdrs ( adminAPI . RemoveRemoteTargetHandler ) ) . Queries ( "bucket" , "{bucket:.*}" , "arn" , "{arn:.*}" )
}
// GetBucketQuotaConfig
adminRouter . Methods ( http . MethodGet ) . Path ( adminVersion + "/get-bucket-quota" ) . HandlerFunc (
httpTraceHdrs ( adminAPI . GetBucketQuotaConfigHandler ) ) . Queries ( "bucket" , "{bucket:.*}" )
// PutBucketQuotaConfig
adminRouter . Methods ( http . MethodPut ) . Path ( adminVersion + "/set-bucket-quota" ) . HandlerFunc (
httpTraceHdrs ( adminAPI . PutBucketQuotaConfigHandler ) ) . Queries ( "bucket" , "{bucket:.*}" )
// Bucket replication operations
// GetBucketTargetHandler
adminRouter . Methods ( http . MethodGet ) . Path ( adminVersion + "/list-remote-targets" ) . HandlerFunc (
httpTraceHdrs ( adminAPI . ListRemoteTargetsHandler ) ) . Queries ( "bucket" , "{bucket:.*}" , "type" , "{type:.*}" )
// SetRemoteTargetHandler
adminRouter . Methods ( http . MethodPut ) . Path ( adminVersion + "/set-remote-target" ) . HandlerFunc (
httpTraceHdrs ( adminAPI . SetRemoteTargetHandler ) ) . Queries ( "bucket" , "{bucket:.*}" )
// RemoveRemoteTargetHandler
adminRouter . Methods ( http . MethodDelete ) . Path ( adminVersion + "/remove-remote-target" ) . HandlerFunc (
httpTraceHdrs ( adminAPI . RemoveRemoteTargetHandler ) ) . Queries ( "bucket" , "{bucket:.*}" , "arn" , "{arn:.*}" )
}
// -- Top APIs --
// Top locks
if globalIsDistErasure {