Make our UUID package internal

Nowadays there are much, much better UUID implementations to choose
from, such as github.com/google/uuid. Prevent external users from
importing our bespoke implementation so that we can change or migrate
away from it internally without introducing breaking changes.

Signed-off-by: Cory Snider <csnider@mirantis.com>
This commit is contained in:
Cory Snider 2023-10-24 18:11:41 -04:00
parent f3ce7c46bd
commit 8a86dc61ff
12 changed files with 10 additions and 10 deletions

View file

@ -4,7 +4,7 @@ import (
"context"
"sync"
"github.com/distribution/distribution/v3/uuid"
"github.com/distribution/distribution/v3/internal/uuid"
)
// instanceContext is a context that provides only an instance id. It is

View file

@ -9,7 +9,7 @@ import (
"sync"
"time"
"github.com/distribution/distribution/v3/uuid"
"github.com/distribution/distribution/v3/internal/uuid"
"github.com/gorilla/mux"
log "github.com/sirupsen/logrus"
)

View file

@ -5,7 +5,7 @@ import (
"runtime"
"time"
"github.com/distribution/distribution/v3/uuid"
"github.com/distribution/distribution/v3/internal/uuid"
)
// WithTrace allocates a traced timing span in a new context. This allows a

View file

@ -18,11 +18,11 @@ import (
"github.com/distribution/distribution/v3"
"github.com/distribution/distribution/v3/context"
"github.com/distribution/distribution/v3/internal/uuid"
"github.com/distribution/distribution/v3/manifest"
"github.com/distribution/distribution/v3/manifest/ocischema"
"github.com/distribution/distribution/v3/registry/api/errcode"
"github.com/distribution/distribution/v3/testutil"
"github.com/distribution/distribution/v3/uuid"
"github.com/distribution/reference"
"github.com/opencontainers/go-digest"
v1 "github.com/opencontainers/image-spec/specs-go/v1"

View file

@ -6,7 +6,7 @@ import (
"github.com/distribution/distribution/v3"
"github.com/distribution/distribution/v3/context"
"github.com/distribution/distribution/v3/uuid"
"github.com/distribution/distribution/v3/internal/uuid"
"github.com/distribution/reference"
events "github.com/docker/go-events"
"github.com/opencontainers/go-digest"

View file

@ -4,10 +4,10 @@ import (
"testing"
"github.com/distribution/distribution/v3"
"github.com/distribution/distribution/v3/internal/uuid"
"github.com/distribution/distribution/v3/manifest"
"github.com/distribution/distribution/v3/manifest/schema2"
v2 "github.com/distribution/distribution/v3/registry/api/v2"
"github.com/distribution/distribution/v3/uuid"
"github.com/distribution/reference"
events "github.com/docker/go-events"
"github.com/opencontainers/go-digest"

View file

@ -23,9 +23,9 @@ import (
"github.com/distribution/distribution/v3/configuration"
dcontext "github.com/distribution/distribution/v3/context"
"github.com/distribution/distribution/v3/health"
"github.com/distribution/distribution/v3/internal/uuid"
"github.com/distribution/distribution/v3/registry/handlers"
"github.com/distribution/distribution/v3/registry/listener"
"github.com/distribution/distribution/v3/uuid"
"github.com/distribution/distribution/v3/version"
)

View file

@ -10,8 +10,8 @@ import (
"github.com/distribution/distribution/v3"
dcontext "github.com/distribution/distribution/v3/context"
"github.com/distribution/distribution/v3/internal/uuid"
"github.com/distribution/distribution/v3/registry/storage/driver"
"github.com/distribution/distribution/v3/uuid"
"github.com/distribution/reference"
"github.com/opencontainers/go-digest"
)

View file

@ -6,8 +6,8 @@ import (
"strings"
"time"
"github.com/distribution/distribution/v3/internal/uuid"
storageDriver "github.com/distribution/distribution/v3/registry/storage/driver"
"github.com/distribution/distribution/v3/uuid"
"github.com/sirupsen/logrus"
)

View file

@ -7,9 +7,9 @@ import (
"testing"
"time"
"github.com/distribution/distribution/v3/internal/uuid"
"github.com/distribution/distribution/v3/registry/storage/driver"
"github.com/distribution/distribution/v3/registry/storage/driver/inmemory"
"github.com/distribution/distribution/v3/uuid"
)
func testUploadFS(t *testing.T, numUploads int, repoName string, startedAt time.Time) (driver.StorageDriver, context.Context) {