Skip to content

Commit

Permalink
rename all remaining packages to internal/ (minio#12418)
Browse files Browse the repository at this point in the history
This is to ensure that there are no projects
that try to import `minio/minio/pkg` into
their own repo. Any such common packages should
go to `https://github.com/minio/pkg`
  • Loading branch information
harshavardhana authored Jun 1, 2021
1 parent bf87c4b commit 1f262da
Show file tree
Hide file tree
Showing 540 changed files with 757 additions and 778 deletions.
4 changes: 2 additions & 2 deletions cmd/acl-handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import (
"net/http"

"github.com/gorilla/mux"
xhttp "github.com/minio/minio/cmd/http"
"github.com/minio/minio/cmd/logger"
xhttp "github.com/minio/minio/internal/http"
"github.com/minio/minio/internal/logger"
"github.com/minio/pkg/bucket/policy"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/admin-bucket-handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"github.com/gorilla/mux"
jsoniter "github.com/json-iterator/go"
"github.com/minio/madmin-go"
"github.com/minio/minio/cmd/logger"
"github.com/minio/minio/internal/logger"
iampolicy "github.com/minio/pkg/iam/policy"
)

Expand Down
18 changes: 9 additions & 9 deletions cmd/admin-handlers-config-kv.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ import (

"github.com/gorilla/mux"
"github.com/minio/madmin-go"
"github.com/minio/minio/cmd/config"
"github.com/minio/minio/cmd/config/cache"
"github.com/minio/minio/cmd/config/etcd"
xldap "github.com/minio/minio/cmd/config/identity/ldap"
"github.com/minio/minio/cmd/config/identity/openid"
"github.com/minio/minio/cmd/config/policy/opa"
"github.com/minio/minio/cmd/config/storageclass"
"github.com/minio/minio/cmd/logger"
"github.com/minio/minio/pkg/auth"
"github.com/minio/minio/internal/auth"
"github.com/minio/minio/internal/config"
"github.com/minio/minio/internal/config/cache"
"github.com/minio/minio/internal/config/etcd"
xldap "github.com/minio/minio/internal/config/identity/ldap"
"github.com/minio/minio/internal/config/identity/openid"
"github.com/minio/minio/internal/config/policy/opa"
"github.com/minio/minio/internal/config/storageclass"
"github.com/minio/minio/internal/logger"
iampolicy "github.com/minio/pkg/iam/policy"
)

Expand Down
6 changes: 3 additions & 3 deletions cmd/admin-handlers-users.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ import (

"github.com/gorilla/mux"
"github.com/minio/madmin-go"
"github.com/minio/minio/cmd/config/dns"
"github.com/minio/minio/cmd/logger"
"github.com/minio/minio/pkg/auth"
"github.com/minio/minio/internal/auth"
"github.com/minio/minio/internal/config/dns"
"github.com/minio/minio/internal/logger"
iampolicy "github.com/minio/pkg/iam/policy"
)

Expand Down
18 changes: 9 additions & 9 deletions cmd/admin-handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ import (
"github.com/gorilla/mux"
"github.com/minio/kes"
"github.com/minio/madmin-go"
"github.com/minio/minio/cmd/config"
xhttp "github.com/minio/minio/cmd/http"
"github.com/minio/minio/cmd/logger"
"github.com/minio/minio/cmd/logger/message/log"
"github.com/minio/minio/pkg/auth"
"github.com/minio/minio/pkg/dsync"
"github.com/minio/minio/pkg/handlers"
"github.com/minio/minio/pkg/kms"
xnet "github.com/minio/minio/pkg/net"
"github.com/minio/minio/internal/auth"
"github.com/minio/minio/internal/config"
"github.com/minio/minio/internal/dsync"
"github.com/minio/minio/internal/handlers"
xhttp "github.com/minio/minio/internal/http"
"github.com/minio/minio/internal/kms"
"github.com/minio/minio/internal/logger"
"github.com/minio/minio/internal/logger/message/log"
xnet "github.com/minio/minio/internal/net"
iampolicy "github.com/minio/pkg/iam/policy"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/admin-handlers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import (

"github.com/gorilla/mux"
"github.com/minio/madmin-go"
"github.com/minio/minio/pkg/auth"
"github.com/minio/minio/internal/auth"
)

// adminErasureTestBed - encapsulates subsystems that need to be setup for
Expand Down
2 changes: 1 addition & 1 deletion cmd/admin-heal-ops.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"time"

"github.com/minio/madmin-go"
"github.com/minio/minio/cmd/logger"
"github.com/minio/minio/internal/logger"
)

// healStatusSummary - overall short summary of a healing sequence
Expand Down
13 changes: 11 additions & 2 deletions cmd/admin-server-info.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"time"

"github.com/minio/madmin-go"
"github.com/minio/minio/cmd/logger"
"github.com/minio/minio/internal/logger"
)

// getLocalServerProperty - returns madmin.ServerProperties for only the
Expand Down Expand Up @@ -61,15 +61,24 @@ func getLocalServerProperty(endpointServerPools EndpointServerPools, r *http.Req
}
}

var memstats runtime.MemStats
runtime.ReadMemStats(&memstats)

props := madmin.ServerProperties{
State: string(madmin.ItemInitializing),
Endpoint: addr,
Uptime: UTCNow().Unix() - globalBootTime.Unix(),
Version: Version,
CommitID: CommitID,
Network: network,
MemStats: madmin.MemStats{
Alloc: memstats.Alloc,
TotalAlloc: memstats.TotalAlloc,
Mallocs: memstats.Mallocs,
Frees: memstats.Frees,
HeapAlloc: memstats.HeapAlloc,
},
}
runtime.ReadMemStats(&props.MemStats)

objLayer := newObjectLayerFn()
if objLayer != nil && !globalIsGateway {
Expand Down
20 changes: 10 additions & 10 deletions cmd/api-errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,17 @@ import (

minio "github.com/minio/minio-go/v7"
"github.com/minio/minio-go/v7/pkg/tags"
"github.com/minio/minio/cmd/config/dns"
"github.com/minio/minio/cmd/crypto"
"github.com/minio/minio/cmd/logger"
"github.com/minio/minio/pkg/auth"
"github.com/minio/minio/pkg/bucket/lifecycle"
"github.com/minio/minio/pkg/bucket/replication"
"github.com/minio/minio/internal/auth"
"github.com/minio/minio/internal/bucket/lifecycle"
"github.com/minio/minio/internal/bucket/replication"
"github.com/minio/minio/internal/config/dns"
"github.com/minio/minio/internal/crypto"
"github.com/minio/minio/internal/logger"

objectlock "github.com/minio/minio/pkg/bucket/object/lock"
"github.com/minio/minio/pkg/bucket/versioning"
"github.com/minio/minio/pkg/event"
"github.com/minio/minio/pkg/hash"
objectlock "github.com/minio/minio/internal/bucket/object/lock"
"github.com/minio/minio/internal/bucket/versioning"
"github.com/minio/minio/internal/event"
"github.com/minio/minio/internal/hash"
"github.com/minio/pkg/bucket/policy"
)

Expand Down
4 changes: 2 additions & 2 deletions cmd/api-errors_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import (
"path/filepath"
"testing"

"github.com/minio/minio/cmd/crypto"
"github.com/minio/minio/pkg/hash"
"github.com/minio/minio/internal/crypto"
"github.com/minio/minio/internal/hash"
)

var toAPIErrorTests = []struct {
Expand Down
6 changes: 3 additions & 3 deletions cmd/api-headers.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ import (
"strings"
"time"

"github.com/minio/minio/cmd/crypto"
xhttp "github.com/minio/minio/cmd/http"
"github.com/minio/minio/pkg/bucket/lifecycle"
"github.com/minio/minio/internal/bucket/lifecycle"
"github.com/minio/minio/internal/crypto"
xhttp "github.com/minio/minio/internal/http"
)

// Returns a hexadecimal representation of time at the
Expand Down
6 changes: 3 additions & 3 deletions cmd/api-response.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ import (
"strings"
"time"

xhttp "github.com/minio/minio/cmd/http"
"github.com/minio/minio/cmd/logger"
"github.com/minio/minio/pkg/handlers"
"github.com/minio/minio/internal/handlers"
xhttp "github.com/minio/minio/internal/http"
"github.com/minio/minio/internal/logger"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion cmd/api-router.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"net/http"

"github.com/gorilla/mux"
xhttp "github.com/minio/minio/cmd/http"
xhttp "github.com/minio/minio/internal/http"
"github.com/minio/pkg/wildcard"
"github.com/rs/cors"
)
Expand Down
14 changes: 7 additions & 7 deletions cmd/auth-handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ import (
"sync/atomic"
"time"

xhttp "github.com/minio/minio/cmd/http"
xjwt "github.com/minio/minio/cmd/jwt"
"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/etag"
"github.com/minio/minio/pkg/hash"
"github.com/minio/minio/internal/auth"
objectlock "github.com/minio/minio/internal/bucket/object/lock"
"github.com/minio/minio/internal/etag"
"github.com/minio/minio/internal/hash"
xhttp "github.com/minio/minio/internal/http"
xjwt "github.com/minio/minio/internal/jwt"
"github.com/minio/minio/internal/logger"
"github.com/minio/pkg/bucket/policy"
iampolicy "github.com/minio/pkg/iam/policy"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/auth-handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
"testing"
"time"

"github.com/minio/minio/pkg/auth"
"github.com/minio/minio/internal/auth"
iampolicy "github.com/minio/pkg/iam/policy"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/background-heal-ops.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"time"

"github.com/minio/madmin-go"
"github.com/minio/minio/cmd/logger"
"github.com/minio/minio/internal/logger"
)

// healTask represents what to heal along with options
Expand Down
4 changes: 2 additions & 2 deletions cmd/background-newdisks-heal-ops.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ import (
"github.com/dustin/go-humanize"
"github.com/minio/madmin-go"
"github.com/minio/minio-go/v7/pkg/set"
"github.com/minio/minio/cmd/logger"
"github.com/minio/minio/pkg/color"
"github.com/minio/minio/internal/color"
"github.com/minio/minio/internal/logger"
"github.com/minio/pkg/console"
)

Expand Down
6 changes: 3 additions & 3 deletions cmd/bitrot-streaming.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ import (
"io"
"sync"

xhttp "github.com/minio/minio/cmd/http"
"github.com/minio/minio/cmd/logger"
"github.com/minio/minio/pkg/ioutil"
xhttp "github.com/minio/minio/internal/http"
"github.com/minio/minio/internal/ioutil"
"github.com/minio/minio/internal/logger"
)

// Calculates bitrot in chunks and writes the hash into the stream.
Expand Down
2 changes: 1 addition & 1 deletion cmd/bitrot-whole.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"hash"
"io"

"github.com/minio/minio/cmd/logger"
"github.com/minio/minio/internal/logger"
)

// Implementation to calculate bitrot for the whole file.
Expand Down
2 changes: 1 addition & 1 deletion cmd/bitrot.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"io"

"github.com/minio/highwayhash"
"github.com/minio/minio/cmd/logger"
"github.com/minio/minio/internal/logger"
"golang.org/x/crypto/blake2b"
)

Expand Down
6 changes: 3 additions & 3 deletions cmd/bootstrap-peer-server.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ import (

"github.com/gorilla/mux"
"github.com/minio/minio-go/v7/pkg/set"
xhttp "github.com/minio/minio/cmd/http"
"github.com/minio/minio/cmd/logger"
"github.com/minio/minio/cmd/rest"
xhttp "github.com/minio/minio/internal/http"
"github.com/minio/minio/internal/logger"
"github.com/minio/minio/internal/rest"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion cmd/bucket-encryption-handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"net/http"

"github.com/gorilla/mux"
"github.com/minio/minio/cmd/logger"
"github.com/minio/minio/internal/logger"
"github.com/minio/pkg/bucket/policy"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/bucket-encryption.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"errors"
"io"

bucketsse "github.com/minio/minio/pkg/bucket/encryption"
bucketsse "github.com/minio/minio/internal/bucket/encryption"
)

// BucketSSEConfigSys - in-memory cache of bucket encryption config
Expand Down
22 changes: 11 additions & 11 deletions cmd/bucket-handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,17 @@ import (

"github.com/minio/minio-go/v7/pkg/set"
"github.com/minio/minio-go/v7/pkg/tags"
"github.com/minio/minio/cmd/config/dns"
"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/replication"
"github.com/minio/minio/pkg/event"
"github.com/minio/minio/pkg/handlers"
"github.com/minio/minio/pkg/hash"
"github.com/minio/minio/pkg/kms"
"github.com/minio/minio/pkg/sync/errgroup"
objectlock "github.com/minio/minio/internal/bucket/object/lock"
"github.com/minio/minio/internal/bucket/replication"
"github.com/minio/minio/internal/config/dns"
"github.com/minio/minio/internal/crypto"
"github.com/minio/minio/internal/event"
"github.com/minio/minio/internal/handlers"
"github.com/minio/minio/internal/hash"
xhttp "github.com/minio/minio/internal/http"
"github.com/minio/minio/internal/kms"
"github.com/minio/minio/internal/logger"
"github.com/minio/minio/internal/sync/errgroup"
"github.com/minio/pkg/bucket/policy"
iampolicy "github.com/minio/pkg/iam/policy"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/bucket-handlers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"strconv"
"testing"

"github.com/minio/minio/pkg/auth"
"github.com/minio/minio/internal/auth"
)

// Wrapper for calling RemoveBucket HTTP handler tests for both Erasure multiple disks and single node setup.
Expand Down
6 changes: 3 additions & 3 deletions cmd/bucket-lifecycle-handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ import (
"net/http"

"github.com/gorilla/mux"
xhttp "github.com/minio/minio/cmd/http"
"github.com/minio/minio/cmd/logger"
"github.com/minio/minio/pkg/bucket/lifecycle"
"github.com/minio/minio/internal/bucket/lifecycle"
xhttp "github.com/minio/minio/internal/http"
"github.com/minio/minio/internal/logger"
"github.com/minio/pkg/bucket/policy"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/bucket-lifecycle-handlers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"net/http/httptest"
"testing"

"github.com/minio/minio/pkg/auth"
"github.com/minio/minio/internal/auth"
)

// Test S3 Bucket lifecycle APIs with wrong credentials
Expand Down
Loading

0 comments on commit 1f262da

Please sign in to comment.