Skip to content

Commit

Permalink
Remove support for sqlite database
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefano Da Ros committed Jun 20, 2019
1 parent 7568c07 commit 6cebc82
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 260 deletions.
97 changes: 0 additions & 97 deletions build/migrate-to-sqlite.sh

This file was deleted.

21 changes: 0 additions & 21 deletions config/config.example.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,3 @@
# Using a SQLite database
---
name: workflow-connector
displayName: Signavio Workflow Connector
description: >
A web service which provides a Workflow Accelerator conform
RESTful API on top of standard SQL Databases
port: 443
database:
driver: sqlite
url: test.db
tls:
enabled: false
publicKey: ./config/server.crt
privateKey: ./config/server.key
auth:
username: wfauser
# password = Foobar
passwordHash: "$argon2i$v=19$m=512,t=2,p=2$SUxvdmVTYWx0Q2FrZXMhISE$UgSWnBB5OkdqMAu+OfvwNLVMUijMnnmVm0kRSfmS9E8"
logging: true
...
# Using an Oracle database
---
name: workflow-connector
Expand Down
6 changes: 4 additions & 2 deletions config/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ description: >
RESTful API on top of standard SQL Databases
port: 443
database:
driver: sqlite3
url: test.db
driver: postgres
# You can find the list of supported parameters
# at https://godoc.org/github.com/lib/pq
url: postgres://bob:[email protected]/test?sslmode=verify-full
tls:
enabled: false
publicKey: ./config/server.crt
Expand Down
3 changes: 0 additions & 3 deletions internal/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,13 @@ import (
"github.com/signavio/workflow-connector/internal/pkg/sql/mysql"
"github.com/signavio/workflow-connector/internal/pkg/sql/oracle"
"github.com/signavio/workflow-connector/internal/pkg/sql/postgres"
"github.com/signavio/workflow-connector/internal/pkg/sql/sqlite"
"github.com/signavio/workflow-connector/internal/pkg/sql/sqlserver"
)

func NewEndpoint(cfg config.Config) (endpoint.Endpoint, error) {
switch cfg.Database.Driver {
case "sqlserver":
return sqlserver.New(), nil
case "sqlite3":
return sqlite.New(), nil
case "mysql":
return mysql.New(), nil
case "postgres":
Expand Down
131 changes: 0 additions & 131 deletions internal/pkg/sql/sqlite/sqlite.go

This file was deleted.

7 changes: 1 addition & 6 deletions internal/pkg/sql/sqltests/sqlBackend_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import (
"github.com/signavio/workflow-connector/internal/pkg/sql/mysql"
"github.com/signavio/workflow-connector/internal/pkg/sql/oracle"
"github.com/signavio/workflow-connector/internal/pkg/sql/postgres"
"github.com/signavio/workflow-connector/internal/pkg/sql/sqlite"
"github.com/signavio/workflow-connector/internal/pkg/sql/sqlserver"
"github.com/spf13/viper"
)
Expand Down Expand Up @@ -91,18 +90,14 @@ func TestSqlBackends(t *testing.T) {
testUsingDB = viper.Get("db").(string)
}
switch {
case strings.Contains(testUsingDB, "sqlite"):
testSqlBackend(t, "sqlite", "sqlite3", sqlite.New)
case strings.Contains(testUsingDB, "mysql"):
testSqlBackend(t, "mysql", "mysql", mysql.New)
case strings.Contains(testUsingDB, "oracle"):
testSqlBackend(t, "oracle", "goracle", oracle.New)
case strings.Contains(testUsingDB, "sqlserver"):
testSqlBackend(t, "sqlserver", "sqlserver", sqlserver.New)
case strings.Contains(testUsingDB, "postgres"):
testSqlBackend(t, "postgres", "postgres", postgres.New)
default:
testSqlBackend(t, "sqlite", "sqlite3", sqlite.New)
testSqlBackend(t, "postgres", "postgres", postgres.New)
}
}

Expand Down

0 comments on commit 6cebc82

Please sign in to comment.