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

@@ -22,7 +22,6 @@ import (
"github.com/minio/cli"
"github.com/minio/madmin-go"
minio "github.com/minio/minio/cmd"
"github.com/minio/minio/internal/auth"
)
func init() {
@@ -86,7 +85,7 @@ func (g *NAS) Name() string {
}
// NewGatewayLayer returns nas gatewaylayer.
func (g *NAS) NewGatewayLayer(creds auth.Credentials) (minio.ObjectLayer, error) {
func (g *NAS) NewGatewayLayer(creds madmin.Credentials) (minio.ObjectLayer, error) {
var err error
newObject, err := minio.NewFSObjectLayer(g.path)
if err != nil {
@@ -95,11 +94,6 @@ func (g *NAS) NewGatewayLayer(creds auth.Credentials) (minio.ObjectLayer, error)
return &nasObjects{newObject}, nil
}
// Production - nas gateway is production ready.
func (g *NAS) Production() bool {
return true
}
// IsListenSupported returns whether listen bucket notification is applicable for this gateway.
func (n *nasObjects) IsListenSupported() bool {
return false