Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP]Remove rdbms storage from pkg/storage #502

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions cmd/olympus/actions/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
"github.com/gomods/athens/pkg/storage/fs"
"github.com/gomods/athens/pkg/storage/mem"
"github.com/gomods/athens/pkg/storage/mongo"
"github.com/gomods/athens/pkg/storage/rdbms"
"github.com/spf13/afero"
)

Expand All @@ -34,12 +33,6 @@ func GetStorage() (storage.Backend, error) {
return nil, err
}
return mongo.NewStorage(mongoURI)
case "postgres", "sqlite", "cockroach", "mysql":
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we are removing postgres support but starting postrgres image. why is that?

connectionName, err := env.RdbmsName()
if err != nil {
return nil, err
}
return rdbms.NewRDBMSStorage(connectionName)
default:
return nil, fmt.Errorf("storage type %s is unknown", storageType)
}
Expand Down
7 changes: 0 additions & 7 deletions cmd/proxy/actions/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import (
"github.com/gomods/athens/pkg/storage/mem"
"github.com/gomods/athens/pkg/storage/minio"
"github.com/gomods/athens/pkg/storage/mongo"
"github.com/gomods/athens/pkg/storage/rdbms"
"github.com/spf13/afero"
)

Expand Down Expand Up @@ -41,12 +40,6 @@ func GetStorage() (storage.Backend, error) {
return nil, fmt.Errorf("could not create new storage from os fs (%s)", err)
}
return s, nil
case "postgres", "sqlite", "cockroach", "mysql":
storageRoot, err = env.RdbmsName()
if err != nil {
return nil, err
}
return rdbms.NewRDBMSStorage(storageRoot)
case "minio":
endpoint, err := env.MinioEndpoint()
if err != nil {
Expand Down
22 changes: 0 additions & 22 deletions pkg/storage/rdbms/all_test.go

This file was deleted.

19 changes: 0 additions & 19 deletions pkg/storage/rdbms/checker.go

This file was deleted.

25 changes: 0 additions & 25 deletions pkg/storage/rdbms/deleter.go

This file was deleted.

50 changes: 0 additions & 50 deletions pkg/storage/rdbms/getter.go

This file was deleted.

26 changes: 0 additions & 26 deletions pkg/storage/rdbms/lister.go

This file was deleted.

62 changes: 0 additions & 62 deletions pkg/storage/rdbms/models/modules.go

This file was deleted.

45 changes: 0 additions & 45 deletions pkg/storage/rdbms/rdbms.go

This file was deleted.

11 changes: 0 additions & 11 deletions pkg/storage/rdbms/rdbms_test.go

This file was deleted.

29 changes: 0 additions & 29 deletions pkg/storage/rdbms/saver.go

This file was deleted.

38 changes: 0 additions & 38 deletions pkg/storage/rdbms/test_suite.go

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (
"github.com/gomods/athens/pkg/storage/mem"
"github.com/gomods/athens/pkg/storage/minio"
"github.com/gomods/athens/pkg/storage/mongo"
"github.com/gomods/athens/pkg/storage/rdbms"
"github.com/stretchr/testify/require"
)

Expand Down Expand Up @@ -133,10 +132,6 @@ func getStores(b *testing.B) []storage.TestSuite {
require.NoError(b, err, "couldn't create mongo store")
stores = append(stores, mongoStore)

rdbmsStore, err := rdbms.NewTestSuite(model)
require.NoError(b, err, "couldn't create mongo store")
stores = append(stores, rdbmsStore)

memStore, err := mem.NewTestSuite(model)
require.NoError(b, err)
stores = append(stores, memStore)
Expand Down