diff options
author | Neil Alexander <neilalexander@users.noreply.github.com> | 2020-12-02 17:41:00 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-02 17:41:00 +0000 |
commit | b5aa7ca3ab1c91397700637c91d60860a0535f1e (patch) | |
tree | 9da277c7b22027f09a7f45b0b0d771e44949e8f0 /syncapi | |
parent | 3ef6187e96ca2d68b3014bbd150e69971b6f7800 (diff) |
Top-level setup package (#1605)
* Move config, setup, mscs into "setup" top-level folder
* oops, forgot the EDU server
* Add setup
* goimports
Diffstat (limited to 'syncapi')
-rw-r--r-- | syncapi/consumers/clientapi.go | 2 | ||||
-rw-r--r-- | syncapi/consumers/eduserver_receipts.go | 2 | ||||
-rw-r--r-- | syncapi/consumers/eduserver_sendtodevice.go | 2 | ||||
-rw-r--r-- | syncapi/consumers/eduserver_typing.go | 2 | ||||
-rw-r--r-- | syncapi/consumers/roomserver.go | 2 | ||||
-rw-r--r-- | syncapi/internal/keychange_test.go | 2 | ||||
-rw-r--r-- | syncapi/routing/messages.go | 2 | ||||
-rw-r--r-- | syncapi/routing/routing.go | 2 | ||||
-rw-r--r-- | syncapi/storage/postgres/syncserver.go | 2 | ||||
-rw-r--r-- | syncapi/storage/sqlite3/syncserver.go | 2 | ||||
-rw-r--r-- | syncapi/storage/storage.go | 2 | ||||
-rw-r--r-- | syncapi/storage/storage_test.go | 2 | ||||
-rw-r--r-- | syncapi/storage/storage_wasm.go | 2 | ||||
-rw-r--r-- | syncapi/sync/requestpool.go | 2 | ||||
-rw-r--r-- | syncapi/syncapi.go | 4 | ||||
-rw-r--r-- | syncapi/types/types_test.go | 12 |
16 files changed, 22 insertions, 22 deletions
diff --git a/syncapi/consumers/clientapi.go b/syncapi/consumers/clientapi.go index d03dd2c4..7070dd32 100644 --- a/syncapi/consumers/clientapi.go +++ b/syncapi/consumers/clientapi.go @@ -20,8 +20,8 @@ import ( "github.com/Shopify/sarama" "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/config" "github.com/matrix-org/dendrite/internal/eventutil" + "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/dendrite/syncapi/storage" "github.com/matrix-org/dendrite/syncapi/sync" "github.com/matrix-org/dendrite/syncapi/types" diff --git a/syncapi/consumers/eduserver_receipts.go b/syncapi/consumers/eduserver_receipts.go index c5d17414..3361e134 100644 --- a/syncapi/consumers/eduserver_receipts.go +++ b/syncapi/consumers/eduserver_receipts.go @@ -23,7 +23,7 @@ import ( "github.com/Shopify/sarama" "github.com/matrix-org/dendrite/eduserver/api" "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/config" + "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/dendrite/syncapi/storage" "github.com/matrix-org/dendrite/syncapi/sync" log "github.com/sirupsen/logrus" diff --git a/syncapi/consumers/eduserver_sendtodevice.go b/syncapi/consumers/eduserver_sendtodevice.go index f880f3f2..07324fcd 100644 --- a/syncapi/consumers/eduserver_sendtodevice.go +++ b/syncapi/consumers/eduserver_sendtodevice.go @@ -21,7 +21,7 @@ import ( "github.com/Shopify/sarama" "github.com/matrix-org/dendrite/eduserver/api" "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/config" + "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/dendrite/syncapi/storage" "github.com/matrix-org/dendrite/syncapi/sync" "github.com/matrix-org/dendrite/syncapi/types" diff --git a/syncapi/consumers/eduserver_typing.go b/syncapi/consumers/eduserver_typing.go index 80d1d000..bdea606c 100644 --- a/syncapi/consumers/eduserver_typing.go +++ b/syncapi/consumers/eduserver_typing.go @@ -20,7 +20,7 @@ import ( "github.com/Shopify/sarama" "github.com/matrix-org/dendrite/eduserver/api" "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/config" + "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/dendrite/syncapi/storage" "github.com/matrix-org/dendrite/syncapi/sync" "github.com/matrix-org/dendrite/syncapi/types" diff --git a/syncapi/consumers/roomserver.go b/syncapi/consumers/roomserver.go index 05f32a83..4d453f13 100644 --- a/syncapi/consumers/roomserver.go +++ b/syncapi/consumers/roomserver.go @@ -21,8 +21,8 @@ import ( "github.com/Shopify/sarama" "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/config" "github.com/matrix-org/dendrite/roomserver/api" + "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/dendrite/syncapi/storage" "github.com/matrix-org/dendrite/syncapi/sync" "github.com/matrix-org/dendrite/syncapi/types" diff --git a/syncapi/internal/keychange_test.go b/syncapi/internal/keychange_test.go index c2501181..adf498d2 100644 --- a/syncapi/internal/keychange_test.go +++ b/syncapi/internal/keychange_test.go @@ -18,7 +18,7 @@ var ( syncingUser = "@alice:localhost" emptyToken = types.NewStreamToken(0, 0, nil) newestToken = types.NewStreamToken(0, 0, map[string]*types.LogPosition{ - DeviceListLogName: &types.LogPosition{ + DeviceListLogName: { Offset: sarama.OffsetNewest, Partition: 0, }, diff --git a/syncapi/routing/messages.go b/syncapi/routing/messages.go index 81a7857f..92f36e23 100644 --- a/syncapi/routing/messages.go +++ b/syncapi/routing/messages.go @@ -22,8 +22,8 @@ import ( "strconv" "github.com/matrix-org/dendrite/clientapi/jsonerror" - "github.com/matrix-org/dendrite/internal/config" "github.com/matrix-org/dendrite/roomserver/api" + "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/dendrite/syncapi/storage" "github.com/matrix-org/dendrite/syncapi/types" userapi "github.com/matrix-org/dendrite/userapi/api" diff --git a/syncapi/routing/routing.go b/syncapi/routing/routing.go index 141eec79..20152b48 100644 --- a/syncapi/routing/routing.go +++ b/syncapi/routing/routing.go @@ -18,9 +18,9 @@ import ( "net/http" "github.com/gorilla/mux" - "github.com/matrix-org/dendrite/internal/config" "github.com/matrix-org/dendrite/internal/httputil" "github.com/matrix-org/dendrite/roomserver/api" + "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/dendrite/syncapi/storage" "github.com/matrix-org/dendrite/syncapi/sync" userapi "github.com/matrix-org/dendrite/userapi/api" diff --git a/syncapi/storage/postgres/syncserver.go b/syncapi/storage/postgres/syncserver.go index 979e19a0..a77c0ec0 100644 --- a/syncapi/storage/postgres/syncserver.go +++ b/syncapi/storage/postgres/syncserver.go @@ -21,8 +21,8 @@ import ( // Import the postgres database driver. _ "github.com/lib/pq" "github.com/matrix-org/dendrite/eduserver/cache" - "github.com/matrix-org/dendrite/internal/config" "github.com/matrix-org/dendrite/internal/sqlutil" + "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/dendrite/syncapi/storage/shared" ) diff --git a/syncapi/storage/sqlite3/syncserver.go b/syncapi/storage/sqlite3/syncserver.go index 036e2b2e..7df71b38 100644 --- a/syncapi/storage/sqlite3/syncserver.go +++ b/syncapi/storage/sqlite3/syncserver.go @@ -22,8 +22,8 @@ import ( _ "github.com/mattn/go-sqlite3" "github.com/matrix-org/dendrite/eduserver/cache" - "github.com/matrix-org/dendrite/internal/config" "github.com/matrix-org/dendrite/internal/sqlutil" + "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/dendrite/syncapi/storage/shared" ) diff --git a/syncapi/storage/storage.go b/syncapi/storage/storage.go index c16dcd81..15386c33 100644 --- a/syncapi/storage/storage.go +++ b/syncapi/storage/storage.go @@ -19,7 +19,7 @@ package storage import ( "fmt" - "github.com/matrix-org/dendrite/internal/config" + "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/dendrite/syncapi/storage/postgres" "github.com/matrix-org/dendrite/syncapi/storage/sqlite3" ) diff --git a/syncapi/storage/storage_test.go b/syncapi/storage/storage_test.go index 3930ab6b..b1b0d254 100644 --- a/syncapi/storage/storage_test.go +++ b/syncapi/storage/storage_test.go @@ -9,7 +9,7 @@ import ( "testing" "time" - "github.com/matrix-org/dendrite/internal/config" + "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/dendrite/syncapi/storage" "github.com/matrix-org/dendrite/syncapi/storage/sqlite3" "github.com/matrix-org/dendrite/syncapi/types" diff --git a/syncapi/storage/storage_wasm.go b/syncapi/storage/storage_wasm.go index 43b7bbea..f7fef962 100644 --- a/syncapi/storage/storage_wasm.go +++ b/syncapi/storage/storage_wasm.go @@ -17,7 +17,7 @@ package storage import ( "fmt" - "github.com/matrix-org/dendrite/internal/config" + "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/dendrite/syncapi/storage/sqlite3" ) diff --git a/syncapi/sync/requestpool.go b/syncapi/sync/requestpool.go index cb84c5bb..0cb6efe7 100644 --- a/syncapi/sync/requestpool.go +++ b/syncapi/sync/requestpool.go @@ -26,9 +26,9 @@ import ( "time" "github.com/matrix-org/dendrite/clientapi/jsonerror" - "github.com/matrix-org/dendrite/internal/config" keyapi "github.com/matrix-org/dendrite/keyserver/api" roomserverAPI "github.com/matrix-org/dendrite/roomserver/api" + "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/dendrite/syncapi/internal" "github.com/matrix-org/dendrite/syncapi/storage" "github.com/matrix-org/dendrite/syncapi/types" diff --git a/syncapi/syncapi.go b/syncapi/syncapi.go index 7e277ba1..0610add5 100644 --- a/syncapi/syncapi.go +++ b/syncapi/syncapi.go @@ -20,10 +20,10 @@ import ( "github.com/gorilla/mux" "github.com/sirupsen/logrus" - "github.com/matrix-org/dendrite/internal/config" - "github.com/matrix-org/dendrite/internal/setup/kafka" keyapi "github.com/matrix-org/dendrite/keyserver/api" "github.com/matrix-org/dendrite/roomserver/api" + "github.com/matrix-org/dendrite/setup/config" + "github.com/matrix-org/dendrite/setup/kafka" userapi "github.com/matrix-org/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib" diff --git a/syncapi/types/types_test.go b/syncapi/types/types_test.go index 34c73dc2..62404a60 100644 --- a/syncapi/types/types_test.go +++ b/syncapi/types/types_test.go @@ -10,27 +10,27 @@ import ( func TestNewSyncTokenWithLogs(t *testing.T) { tests := map[string]*StreamingToken{ - "s4_0": &StreamingToken{ + "s4_0": { syncToken: syncToken{Type: "s", Positions: []StreamPosition{4, 0}}, logs: make(map[string]*LogPosition), }, - "s4_0.dl-0-123": &StreamingToken{ + "s4_0.dl-0-123": { syncToken: syncToken{Type: "s", Positions: []StreamPosition{4, 0}}, logs: map[string]*LogPosition{ - "dl": &LogPosition{ + "dl": { Partition: 0, Offset: 123, }, }, }, - "s4_0.ab-1-14419482332.dl-0-123": &StreamingToken{ + "s4_0.ab-1-14419482332.dl-0-123": { syncToken: syncToken{Type: "s", Positions: []StreamPosition{4, 0}}, logs: map[string]*LogPosition{ - "ab": &LogPosition{ + "ab": { Partition: 1, Offset: 14419482332, }, - "dl": &LogPosition{ + "dl": { Partition: 0, Offset: 123, }, |