aboutsummaryrefslogtreecommitdiff
path: root/serverkeyapi/storage
diff options
context:
space:
mode:
Diffstat (limited to 'serverkeyapi/storage')
-rw-r--r--serverkeyapi/storage/keydb.go4
-rw-r--r--serverkeyapi/storage/keydb_wasm.go4
-rw-r--r--serverkeyapi/storage/postgres/keydb.go3
-rw-r--r--serverkeyapi/storage/postgres/server_key_table.go3
-rw-r--r--serverkeyapi/storage/sqlite3/keydb.go3
-rw-r--r--serverkeyapi/storage/sqlite3/server_key_table.go3
6 files changed, 9 insertions, 11 deletions
diff --git a/serverkeyapi/storage/keydb.go b/serverkeyapi/storage/keydb.go
index b9389bd6..c28c4de1 100644
--- a/serverkeyapi/storage/keydb.go
+++ b/serverkeyapi/storage/keydb.go
@@ -21,7 +21,7 @@ import (
"golang.org/x/crypto/ed25519"
- "github.com/matrix-org/dendrite/internal"
+ "github.com/matrix-org/dendrite/internal/sqlutil"
"github.com/matrix-org/dendrite/serverkeyapi/storage/postgres"
"github.com/matrix-org/dendrite/serverkeyapi/storage/sqlite3"
"github.com/matrix-org/gomatrixserverlib"
@@ -30,7 +30,7 @@ import (
// NewDatabase opens a database connection.
func NewDatabase(
dataSourceName string,
- dbProperties internal.DbProperties,
+ dbProperties sqlutil.DbProperties,
serverName gomatrixserverlib.ServerName,
serverKey ed25519.PublicKey,
serverKeyID gomatrixserverlib.KeyID,
diff --git a/serverkeyapi/storage/keydb_wasm.go b/serverkeyapi/storage/keydb_wasm.go
index 3d2ca550..de66a1d6 100644
--- a/serverkeyapi/storage/keydb_wasm.go
+++ b/serverkeyapi/storage/keydb_wasm.go
@@ -22,7 +22,7 @@ import (
"golang.org/x/crypto/ed25519"
- "github.com/matrix-org/dendrite/internal"
+ "github.com/matrix-org/dendrite/internal/sqlutil"
"github.com/matrix-org/dendrite/serverkeyapi/storage/sqlite3"
"github.com/matrix-org/gomatrixserverlib"
)
@@ -30,7 +30,7 @@ import (
// NewDatabase opens a database connection.
func NewDatabase(
dataSourceName string,
- dbProperties internal.DbProperties, // nolint:unparam
+ dbProperties sqlutil.DbProperties, // nolint:unparam
serverName gomatrixserverlib.ServerName,
serverKey ed25519.PublicKey,
serverKeyID gomatrixserverlib.KeyID,
diff --git a/serverkeyapi/storage/postgres/keydb.go b/serverkeyapi/storage/postgres/keydb.go
index 6282e13b..32cdf951 100644
--- a/serverkeyapi/storage/postgres/keydb.go
+++ b/serverkeyapi/storage/postgres/keydb.go
@@ -21,7 +21,6 @@ import (
"golang.org/x/crypto/ed25519"
- "github.com/matrix-org/dendrite/internal"
"github.com/matrix-org/dendrite/internal/sqlutil"
"github.com/matrix-org/gomatrixserverlib"
)
@@ -38,7 +37,7 @@ type Database struct {
// Returns an error if there was a problem talking to the database.
func NewDatabase(
dataSourceName string,
- dbProperties internal.DbProperties,
+ dbProperties sqlutil.DbProperties,
serverName gomatrixserverlib.ServerName,
serverKey ed25519.PublicKey,
serverKeyID gomatrixserverlib.KeyID,
diff --git a/serverkeyapi/storage/postgres/server_key_table.go b/serverkeyapi/storage/postgres/server_key_table.go
index b3c26a48..87f1c211 100644
--- a/serverkeyapi/storage/postgres/server_key_table.go
+++ b/serverkeyapi/storage/postgres/server_key_table.go
@@ -19,9 +19,8 @@ import (
"context"
"database/sql"
- "github.com/matrix-org/dendrite/internal"
-
"github.com/lib/pq"
+ "github.com/matrix-org/dendrite/internal"
"github.com/matrix-org/gomatrixserverlib"
)
diff --git a/serverkeyapi/storage/sqlite3/keydb.go b/serverkeyapi/storage/sqlite3/keydb.go
index ab423cff..268c7542 100644
--- a/serverkeyapi/storage/sqlite3/keydb.go
+++ b/serverkeyapi/storage/sqlite3/keydb.go
@@ -21,7 +21,6 @@ import (
"golang.org/x/crypto/ed25519"
- "github.com/matrix-org/dendrite/internal"
"github.com/matrix-org/dendrite/internal/sqlutil"
"github.com/matrix-org/gomatrixserverlib"
@@ -48,7 +47,7 @@ func NewDatabase(
if err != nil {
return nil, err
}
- db, err := sqlutil.Open(internal.SQLiteDriverName(), cs, nil)
+ db, err := sqlutil.Open(sqlutil.SQLiteDriverName(), cs, nil)
if err != nil {
return nil, err
}
diff --git a/serverkeyapi/storage/sqlite3/server_key_table.go b/serverkeyapi/storage/sqlite3/server_key_table.go
index ae24a14d..4f03dccb 100644
--- a/serverkeyapi/storage/sqlite3/server_key_table.go
+++ b/serverkeyapi/storage/sqlite3/server_key_table.go
@@ -21,6 +21,7 @@ import (
"strings"
"github.com/matrix-org/dendrite/internal"
+ "github.com/matrix-org/dendrite/internal/sqlutil"
"github.com/matrix-org/gomatrixserverlib"
)
@@ -90,7 +91,7 @@ func (s *serverKeyStatements) bulkSelectServerKeys(
nameAndKeyIDs = append(nameAndKeyIDs, nameAndKeyID(request))
}
- query := strings.Replace(bulkSelectServerKeysSQL, "($1)", internal.QueryVariadic(len(nameAndKeyIDs)), 1)
+ query := strings.Replace(bulkSelectServerKeysSQL, "($1)", sqlutil.QueryVariadic(len(nameAndKeyIDs)), 1)
iKeyIDs := make([]interface{}, len(nameAndKeyIDs))
for i, v := range nameAndKeyIDs {