fix: use madmin.Credentials for gateway interface (#12493)

the main reason is to de-couple the project from
depending on MinIO's internal/auth package, other
changes will subsequently follow.
This commit is contained in:
Harshavardhana
2021-06-14 12:53:49 -07:00
committed by GitHub
parent 0d1d26a4ea
commit 0d1fb10940
7 changed files with 19 additions and 55 deletions

View File

@@ -40,7 +40,6 @@ import (
"github.com/minio/madmin-go"
miniogopolicy "github.com/minio/minio-go/v7/pkg/policy"
minio "github.com/minio/minio/cmd"
"github.com/minio/minio/internal/auth"
"github.com/minio/minio/internal/logger"
"github.com/minio/pkg/bucket/policy"
"github.com/minio/pkg/bucket/policy/condition"
@@ -164,7 +163,7 @@ func (g *GCS) Name() string {
}
// NewGatewayLayer returns gcs ObjectLayer.
func (g *GCS) NewGatewayLayer(creds auth.Credentials) (minio.ObjectLayer, error) {
func (g *GCS) NewGatewayLayer(creds madmin.Credentials) (minio.ObjectLayer, error) {
ctx := minio.GlobalContext
var err error
@@ -206,11 +205,6 @@ func (g *GCS) NewGatewayLayer(creds auth.Credentials) (minio.ObjectLayer, error)
return gcs, nil
}
// Production - GCS gateway is production ready.
func (g *GCS) Production() bool {
return true
}
// Stored in gcs.json - Contents of this file is not used anywhere. It can be
// used for debugging purposes.
type gcsMultipartMetaV1 struct {