Skip to content

Commit 170eaf1

Browse files
committed
rebased :(
1 parent 8c9951e commit 170eaf1

File tree

13 files changed

+37
-36
lines changed

13 files changed

+37
-36
lines changed

internal/app/builder.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515
"github.com/stacklok/toolhive-registry-server/internal/api"
1616
"github.com/stacklok/toolhive-registry-server/internal/config"
1717
"github.com/stacklok/toolhive-registry-server/internal/service"
18-
sources2 "github.com/stacklok/toolhive-registry-server/internal/sources"
18+
"github.com/stacklok/toolhive-registry-server/internal/sources"
1919
"github.com/stacklok/toolhive-registry-server/internal/status"
2020
pkgsync "github.com/stacklok/toolhive-registry-server/internal/sync"
2121
"github.com/stacklok/toolhive-registry-server/internal/sync/coordinator"
@@ -41,8 +41,8 @@ type registryAppConfig struct {
4141
config *config.Config
4242

4343
// Optional component overrides (primarily for testing)
44-
sourceHandlerFactory sources2.SourceHandlerFactory
45-
storageManager sources2.StorageManager
44+
sourceHandlerFactory sources.SourceHandlerFactory
45+
storageManager sources.StorageManager
4646
statusPersistence status.StatusPersistence
4747
syncManager pkgsync.Manager
4848
registryProvider service.RegistryDataProvider
@@ -184,15 +184,15 @@ func WithDataDirectory(dir string) RegistryAppOptions {
184184
}
185185

186186
// WithSourceHandlerFactory allows injecting a custom source handler factory (for testing)
187-
func WithSourceHandlerFactory(factory sources2.SourceHandlerFactory) RegistryAppOptions {
187+
func WithSourceHandlerFactory(factory sources.SourceHandlerFactory) RegistryAppOptions {
188188
return func(cfg *registryAppConfig) error {
189189
cfg.sourceHandlerFactory = factory
190190
return nil
191191
}
192192
}
193193

194194
// WithStorageManager allows injecting a custom storage manager (for testing)
195-
func WithStorageManager(sm sources2.StorageManager) RegistryAppOptions {
195+
func WithStorageManager(sm sources.StorageManager) RegistryAppOptions {
196196
return func(cfg *registryAppConfig) error {
197197
cfg.storageManager = sm
198198
return nil
@@ -239,7 +239,7 @@ func buildSyncComponents(
239239

240240
// Build source handler factory
241241
if b.sourceHandlerFactory == nil {
242-
b.sourceHandlerFactory = sources2.NewSourceHandlerFactory()
242+
b.sourceHandlerFactory = sources.NewSourceHandlerFactory()
243243
}
244244

245245
// Build storage manager
@@ -248,7 +248,7 @@ func buildSyncComponents(
248248
if err := os.MkdirAll(b.dataDir, 0750); err != nil {
249249
return nil, fmt.Errorf("failed to create data directory %s: %w", b.dataDir, err)
250250
}
251-
b.storageManager = sources2.NewFileStorageManager(b.dataDir)
251+
b.storageManager = sources.NewFileStorageManager(b.dataDir)
252252
}
253253

254254
// Build status persistence
File renamed without changes.
File renamed without changes.

internal/service/file_provider_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ import (
1010
"github.com/stretchr/testify/require"
1111
"go.uber.org/mock/gomock"
1212

13-
"github.com/stacklok/toolhive-registry-server/pkg/config"
14-
"github.com/stacklok/toolhive-registry-server/pkg/registry"
15-
sourcesmocks "github.com/stacklok/toolhive-registry-server/pkg/sources/mocks"
13+
"github.com/stacklok/toolhive-registry-server/internal/config"
14+
"github.com/stacklok/toolhive-registry-server/internal/registry"
15+
sourcesmocks "github.com/stacklok/toolhive-registry-server/internal/sources/mocks"
1616
)
1717

1818
func TestFileRegistryDataProvider_GetRegistryData(t *testing.T) {

internal/sources/api_toolhive.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515

1616
"github.com/stacklok/toolhive-registry-server/internal/config"
1717
"github.com/stacklok/toolhive-registry-server/internal/httpclient"
18-
"github.com/stacklok/toolhive-registry-server/pkg/registry"
18+
"github.com/stacklok/toolhive-registry-server/internal/registry"
1919
)
2020

2121
// ToolHiveAPIHandler handles registry data from ToolHive Registry API endpoints

internal/sources/git_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ import (
1212
"github.com/stretchr/testify/mock"
1313
"github.com/stretchr/testify/require"
1414

15-
"github.com/stacklok/toolhive-registry-server/pkg/config"
16-
"github.com/stacklok/toolhive-registry-server/pkg/git"
17-
"github.com/stacklok/toolhive-registry-server/pkg/registry"
15+
"github.com/stacklok/toolhive-registry-server/internal/config"
16+
"github.com/stacklok/toolhive-registry-server/internal/git"
17+
"github.com/stacklok/toolhive-registry-server/internal/registry"
1818
)
1919

2020
const (

internal/sources/mocks/mock_source_handler.go

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/sources/mocks/mock_storage_manager.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/sources/storage_manager.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import (
77
"os"
88
"path/filepath"
99

10-
"github.com/stacklok/toolhive-registry-server/pkg/config"
11-
"github.com/stacklok/toolhive-registry-server/pkg/registry"
10+
"github.com/stacklok/toolhive-registry-server/internal/config"
11+
"github.com/stacklok/toolhive-registry-server/internal/registry"
1212
)
1313

1414
const (

internal/sources/storage_manager_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
toolhivetypes "github.com/stacklok/toolhive/pkg/registry/types"
1010
"github.com/stretchr/testify/require"
1111

12-
"github.com/stacklok/toolhive-registry-server/pkg/registry"
12+
"github.com/stacklok/toolhive-registry-server/internal/registry"
1313
)
1414

1515
func TestFileStorageManager_StoreAndGet(t *testing.T) {

0 commit comments

Comments
 (0)