From b5aa7ca3ab1c91397700637c91d60860a0535f1e Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Wed, 2 Dec 2020 17:41:00 +0000 Subject: [PATCH] Top-level setup package (#1605) * Move config, setup, mscs into "setup" top-level folder * oops, forgot the EDU server * Add setup * goimports --- appservice/appservice.go | 6 +++--- appservice/consumers/roomserver.go | 2 +- appservice/query/query.go | 2 +- appservice/storage/postgres/storage.go | 2 +- appservice/storage/sqlite3/storage.go | 2 +- appservice/storage/storage.go | 2 +- appservice/storage/storage_wasm.go | 2 +- appservice/types/types.go | 2 +- appservice/workers/transaction_scheduler.go | 2 +- build/gobind/monolith.go | 4 ++-- clientapi/auth/password.go | 2 +- clientapi/auth/user_interactive.go | 2 +- clientapi/auth/user_interactive_test.go | 2 +- clientapi/clientapi.go | 4 ++-- clientapi/routing/auth_fallback.go | 2 +- clientapi/routing/createroom.go | 2 +- clientapi/routing/directory.go | 2 +- clientapi/routing/directory_public.go | 2 +- clientapi/routing/getevent.go | 2 +- clientapi/routing/login.go | 2 +- clientapi/routing/membership.go | 2 +- clientapi/routing/memberships.go | 2 +- clientapi/routing/password.go | 2 +- clientapi/routing/profile.go | 2 +- clientapi/routing/rate_limiting.go | 2 +- clientapi/routing/redaction.go | 2 +- clientapi/routing/register.go | 2 +- clientapi/routing/register_test.go | 2 +- clientapi/routing/routing.go | 2 +- clientapi/routing/sendevent.go | 2 +- clientapi/routing/threepid.go | 2 +- clientapi/routing/voip.go | 2 +- clientapi/threepid/invites.go | 2 +- clientapi/threepid/threepid.go | 2 +- cmd/create-account/main.go | 2 +- cmd/dendrite-demo-libp2p/main.go | 4 ++-- cmd/dendrite-demo-libp2p/p2pdendrite.go | 4 ++-- cmd/dendrite-demo-yggdrasil/main.go | 4 ++-- cmd/dendrite-demo-yggdrasil/yggconn/client.go | 2 +- cmd/dendrite-monolith-server/main.go | 6 +++--- cmd/dendrite-polylith-multi/main.go | 4 ++-- .../personalities/appservice.go | 4 ++-- .../personalities/clientapi.go | 4 ++-- .../personalities/eduserver.go | 4 ++-- .../personalities/federationapi.go | 4 ++-- .../personalities/federationsender.go | 4 ++-- .../personalities/keyserver.go | 4 ++-- .../personalities/mediaapi.go | 4 ++-- .../personalities/roomserver.go | 4 ++-- .../personalities/signingkeyserver.go | 4 ++-- cmd/dendrite-polylith-multi/personalities/syncapi.go | 4 ++-- cmd/dendrite-polylith-multi/personalities/userapi.go | 4 ++-- cmd/dendritejs/main.go | 4 ++-- cmd/generate-config/main.go | 2 +- cmd/resolve-state/main.go | 2 +- cmd/roomserver-integration-tests/main.go | 2 +- cmd/syncserver-integration-tests/main.go | 2 +- eduserver/eduserver.go | 6 +++--- federationapi/federationapi.go | 2 +- federationapi/federationapi_test.go | 4 ++-- federationapi/routing/backfill.go | 2 +- federationapi/routing/invite.go | 2 +- federationapi/routing/join.go | 2 +- federationapi/routing/keys.go | 2 +- federationapi/routing/leave.go | 2 +- federationapi/routing/profile.go | 2 +- federationapi/routing/query.go | 2 +- federationapi/routing/routing.go | 2 +- federationapi/routing/send.go | 2 +- federationapi/routing/threepid.go | 2 +- federationsender/consumers/eduserver.go | 2 +- federationsender/consumers/keychange.go | 2 +- federationsender/consumers/roomserver.go | 2 +- federationsender/federationsender.go | 4 ++-- federationsender/internal/api.go | 2 +- federationsender/storage/postgres/storage.go | 2 +- federationsender/storage/sqlite3/storage.go | 2 +- federationsender/storage/storage.go | 2 +- federationsender/storage/storage_wasm.go | 2 +- internal/eventutil/events.go | 2 +- internal/log.go | 2 +- internal/sqlutil/migrate.go | 2 +- internal/sqlutil/trace.go | 2 +- internal/sqlutil/uri.go | 2 +- internal/test/config.go | 2 +- internal/test/server.go | 2 +- keyserver/keyserver.go | 4 ++-- keyserver/storage/postgres/storage.go | 2 +- keyserver/storage/sqlite3/storage.go | 2 +- keyserver/storage/storage.go | 2 +- keyserver/storage/storage_test.go | 2 +- keyserver/storage/storage_wasm.go | 2 +- mediaapi/fileutils/fileutils.go | 2 +- mediaapi/mediaapi.go | 2 +- mediaapi/routing/download.go | 2 +- mediaapi/routing/routing.go | 2 +- mediaapi/routing/upload.go | 2 +- mediaapi/storage/postgres/storage.go | 2 +- mediaapi/storage/sqlite3/storage.go | 2 +- mediaapi/storage/storage.go | 2 +- mediaapi/storage/storage_wasm.go | 2 +- mediaapi/thumbnailer/thumbnailer.go | 2 +- mediaapi/thumbnailer/thumbnailer_bimg.go | 2 +- mediaapi/thumbnailer/thumbnailer_nfnt.go | 2 +- mediaapi/types/types.go | 2 +- roomserver/internal/api.go | 2 +- roomserver/internal/perform/perform_invite.go | 2 +- roomserver/internal/perform/perform_join.go | 2 +- roomserver/internal/perform/perform_leave.go | 2 +- roomserver/internal/perform/perform_peek.go | 2 +- roomserver/roomserver.go | 6 +++--- roomserver/roomserver_test.go | 4 ++-- roomserver/storage/postgres/storage.go | 2 +- roomserver/storage/sqlite3/storage.go | 2 +- roomserver/storage/storage.go | 2 +- roomserver/storage/storage_wasm.go | 2 +- {internal/setup => setup}/base.go | 2 +- {internal => setup}/config/config.go | 0 {internal => setup}/config/config_appservice.go | 0 {internal => setup}/config/config_clientapi.go | 0 {internal => setup}/config/config_eduserver.go | 0 {internal => setup}/config/config_federationapi.go | 0 .../config/config_federationsender.go | 0 {internal => setup}/config/config_global.go | 0 {internal => setup}/config/config_kafka.go | 0 {internal => setup}/config/config_keyserver.go | 0 {internal => setup}/config/config_mediaapi.go | 0 {internal => setup}/config/config_mscs.go | 0 {internal => setup}/config/config_roomserver.go | 0 .../config/config_signingkeyserver.go | 0 {internal => setup}/config/config_syncapi.go | 0 {internal => setup}/config/config_test.go | 0 {internal => setup}/config/config_userapi.go | 0 {internal/setup => setup}/federation.go | 0 {internal/setup => setup}/flags.go | 2 +- {internal/setup => setup}/kafka/kafka.go | 2 +- {internal/setup => setup}/monolith.go | 2 +- {internal => setup}/mscs/msc2836/msc2836.go | 2 +- {internal => setup}/mscs/msc2836/msc2836_test.go | 6 +++--- {internal => setup}/mscs/msc2836/storage.go | 2 +- {internal => setup}/mscs/mscs.go | 4 ++-- signingkeyserver/internal/api.go | 2 +- signingkeyserver/serverkeyapi_test.go | 2 +- signingkeyserver/signingkeyserver.go | 2 +- signingkeyserver/storage/keydb.go | 2 +- signingkeyserver/storage/postgres/keydb.go | 2 +- signingkeyserver/storage/sqlite3/keydb.go | 2 +- syncapi/consumers/clientapi.go | 2 +- syncapi/consumers/eduserver_receipts.go | 2 +- syncapi/consumers/eduserver_sendtodevice.go | 2 +- syncapi/consumers/eduserver_typing.go | 2 +- syncapi/consumers/roomserver.go | 2 +- syncapi/internal/keychange_test.go | 2 +- syncapi/routing/messages.go | 2 +- syncapi/routing/routing.go | 2 +- syncapi/storage/postgres/syncserver.go | 2 +- syncapi/storage/sqlite3/syncserver.go | 2 +- syncapi/storage/storage.go | 2 +- syncapi/storage/storage_test.go | 2 +- syncapi/storage/storage_wasm.go | 2 +- syncapi/sync/requestpool.go | 2 +- syncapi/syncapi.go | 4 ++-- syncapi/types/types_test.go | 12 ++++++------ userapi/internal/api.go | 2 +- userapi/storage/accounts/postgres/storage.go | 2 +- userapi/storage/accounts/sqlite3/storage.go | 2 +- userapi/storage/accounts/storage.go | 2 +- userapi/storage/accounts/storage_wasm.go | 2 +- userapi/storage/devices/postgres/storage.go | 2 +- userapi/storage/devices/sqlite3/storage.go | 2 +- userapi/storage/devices/storage.go | 2 +- userapi/storage/devices/storage_wasm.go | 2 +- userapi/userapi.go | 2 +- userapi/userapi_test.go | 2 +- 174 files changed, 196 insertions(+), 196 deletions(-) rename {internal/setup => setup}/base.go (99%) rename {internal => setup}/config/config.go (100%) rename {internal => setup}/config/config_appservice.go (100%) rename {internal => setup}/config/config_clientapi.go (100%) rename {internal => setup}/config/config_eduserver.go (100%) rename {internal => setup}/config/config_federationapi.go (100%) rename {internal => setup}/config/config_federationsender.go (100%) rename {internal => setup}/config/config_global.go (100%) rename {internal => setup}/config/config_kafka.go (100%) rename {internal => setup}/config/config_keyserver.go (100%) rename {internal => setup}/config/config_mediaapi.go (100%) rename {internal => setup}/config/config_mscs.go (100%) rename {internal => setup}/config/config_roomserver.go (100%) rename {internal => setup}/config/config_signingkeyserver.go (100%) rename {internal => setup}/config/config_syncapi.go (100%) rename {internal => setup}/config/config_test.go (100%) rename {internal => setup}/config/config_userapi.go (100%) rename {internal/setup => setup}/federation.go (100%) rename {internal/setup => setup}/flags.go (96%) rename {internal/setup => setup}/kafka/kafka.go (97%) rename {internal/setup => setup}/monolith.go (98%) rename {internal => setup}/mscs/msc2836/msc2836.go (99%) rename {internal => setup}/mscs/msc2836/msc2836_test.go (99%) rename {internal => setup}/mscs/msc2836/storage.go (99%) rename {internal => setup}/mscs/mscs.go (92%) diff --git a/appservice/appservice.go b/appservice/appservice.go index cf9a47b74..7a438041a 100644 --- a/appservice/appservice.go +++ b/appservice/appservice.go @@ -28,10 +28,10 @@ import ( "github.com/matrix-org/dendrite/appservice/storage" "github.com/matrix-org/dendrite/appservice/types" "github.com/matrix-org/dendrite/appservice/workers" - "github.com/matrix-org/dendrite/internal/config" - "github.com/matrix-org/dendrite/internal/setup" - "github.com/matrix-org/dendrite/internal/setup/kafka" roomserverAPI "github.com/matrix-org/dendrite/roomserver/api" + "github.com/matrix-org/dendrite/setup" + "github.com/matrix-org/dendrite/setup/config" + "github.com/matrix-org/dendrite/setup/kafka" userapi "github.com/matrix-org/dendrite/userapi/api" "github.com/sirupsen/logrus" ) diff --git a/appservice/consumers/roomserver.go b/appservice/consumers/roomserver.go index 4f6b4b4d4..0b251d43d 100644 --- a/appservice/consumers/roomserver.go +++ b/appservice/consumers/roomserver.go @@ -21,8 +21,8 @@ import ( "github.com/matrix-org/dendrite/appservice/storage" "github.com/matrix-org/dendrite/appservice/types" "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/gomatrixserverlib" "github.com/Shopify/sarama" diff --git a/appservice/query/query.go b/appservice/query/query.go index fa3844f68..7e5ac4753 100644 --- a/appservice/query/query.go +++ b/appservice/query/query.go @@ -23,7 +23,7 @@ import ( "time" "github.com/matrix-org/dendrite/appservice/api" - "github.com/matrix-org/dendrite/internal/config" + "github.com/matrix-org/dendrite/setup/config" opentracing "github.com/opentracing/opentracing-go" log "github.com/sirupsen/logrus" ) diff --git a/appservice/storage/postgres/storage.go b/appservice/storage/postgres/storage.go index 952158167..d2c3e261e 100644 --- a/appservice/storage/postgres/storage.go +++ b/appservice/storage/postgres/storage.go @@ -21,8 +21,8 @@ import ( // Import postgres database driver _ "github.com/lib/pq" - "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/gomatrixserverlib" ) diff --git a/appservice/storage/sqlite3/storage.go b/appservice/storage/sqlite3/storage.go index 916845ab2..6ba5a6f69 100644 --- a/appservice/storage/sqlite3/storage.go +++ b/appservice/storage/sqlite3/storage.go @@ -20,8 +20,8 @@ import ( "database/sql" // Import SQLite database driver - "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/gomatrixserverlib" _ "github.com/mattn/go-sqlite3" ) diff --git a/appservice/storage/storage.go b/appservice/storage/storage.go index e2d7e4e54..b0df2b7dc 100644 --- a/appservice/storage/storage.go +++ b/appservice/storage/storage.go @@ -21,7 +21,7 @@ import ( "github.com/matrix-org/dendrite/appservice/storage/postgres" "github.com/matrix-org/dendrite/appservice/storage/sqlite3" - "github.com/matrix-org/dendrite/internal/config" + "github.com/matrix-org/dendrite/setup/config" ) // NewDatabase opens a new Postgres or Sqlite database (based on dataSourceName scheme) diff --git a/appservice/storage/storage_wasm.go b/appservice/storage/storage_wasm.go index 7eb7da26e..07d0e9ee1 100644 --- a/appservice/storage/storage_wasm.go +++ b/appservice/storage/storage_wasm.go @@ -18,7 +18,7 @@ import ( "fmt" "github.com/matrix-org/dendrite/appservice/storage/sqlite3" - "github.com/matrix-org/dendrite/internal/config" + "github.com/matrix-org/dendrite/setup/config" ) func NewDatabase(dbProperties *config.DatabaseOptions) (Database, error) { diff --git a/appservice/types/types.go b/appservice/types/types.go index b6386df67..098face62 100644 --- a/appservice/types/types.go +++ b/appservice/types/types.go @@ -15,7 +15,7 @@ package types import ( "sync" - "github.com/matrix-org/dendrite/internal/config" + "github.com/matrix-org/dendrite/setup/config" ) const ( diff --git a/appservice/workers/transaction_scheduler.go b/appservice/workers/transaction_scheduler.go index 6e8e8f4a3..6528fc1b6 100644 --- a/appservice/workers/transaction_scheduler.go +++ b/appservice/workers/transaction_scheduler.go @@ -26,7 +26,7 @@ import ( "github.com/matrix-org/dendrite/appservice/storage" "github.com/matrix-org/dendrite/appservice/types" - "github.com/matrix-org/dendrite/internal/config" + "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/gomatrixserverlib" log "github.com/sirupsen/logrus" ) diff --git a/build/gobind/monolith.go b/build/gobind/monolith.go index fdb148775..1fda9a62c 100644 --- a/build/gobind/monolith.go +++ b/build/gobind/monolith.go @@ -17,11 +17,11 @@ import ( "github.com/matrix-org/dendrite/eduserver/cache" "github.com/matrix-org/dendrite/federationsender" "github.com/matrix-org/dendrite/federationsender/api" - "github.com/matrix-org/dendrite/internal/config" "github.com/matrix-org/dendrite/internal/httputil" - "github.com/matrix-org/dendrite/internal/setup" "github.com/matrix-org/dendrite/keyserver" "github.com/matrix-org/dendrite/roomserver" + "github.com/matrix-org/dendrite/setup" + "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/dendrite/userapi" "github.com/matrix-org/gomatrixserverlib" "github.com/sirupsen/logrus" diff --git a/clientapi/auth/password.go b/clientapi/auth/password.go index d98019550..bf4a95366 100644 --- a/clientapi/auth/password.go +++ b/clientapi/auth/password.go @@ -20,7 +20,7 @@ import ( "github.com/matrix-org/dendrite/clientapi/jsonerror" "github.com/matrix-org/dendrite/clientapi/userutil" - "github.com/matrix-org/dendrite/internal/config" + "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/dendrite/userapi/api" "github.com/matrix-org/util" ) diff --git a/clientapi/auth/user_interactive.go b/clientapi/auth/user_interactive.go index b7414ebe9..839637351 100644 --- a/clientapi/auth/user_interactive.go +++ b/clientapi/auth/user_interactive.go @@ -20,7 +20,7 @@ import ( "net/http" "github.com/matrix-org/dendrite/clientapi/jsonerror" - "github.com/matrix-org/dendrite/internal/config" + "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/dendrite/userapi/api" "github.com/matrix-org/util" "github.com/sirupsen/logrus" diff --git a/clientapi/auth/user_interactive_test.go b/clientapi/auth/user_interactive_test.go index 47d1cad36..0b7df3545 100644 --- a/clientapi/auth/user_interactive_test.go +++ b/clientapi/auth/user_interactive_test.go @@ -6,7 +6,7 @@ import ( "fmt" "testing" - "github.com/matrix-org/dendrite/internal/config" + "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/util" diff --git a/clientapi/clientapi.go b/clientapi/clientapi.go index ebe55aec9..8a2ea8fc4 100644 --- a/clientapi/clientapi.go +++ b/clientapi/clientapi.go @@ -22,11 +22,11 @@ import ( "github.com/matrix-org/dendrite/clientapi/routing" eduServerAPI "github.com/matrix-org/dendrite/eduserver/api" federationSenderAPI "github.com/matrix-org/dendrite/federationsender/api" - "github.com/matrix-org/dendrite/internal/config" - "github.com/matrix-org/dendrite/internal/setup/kafka" "github.com/matrix-org/dendrite/internal/transactions" keyserverAPI "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/setup/kafka" userapi "github.com/matrix-org/dendrite/userapi/api" "github.com/matrix-org/dendrite/userapi/storage/accounts" "github.com/matrix-org/gomatrixserverlib" diff --git a/clientapi/routing/auth_fallback.go b/clientapi/routing/auth_fallback.go index e639b1015..839ca9e54 100644 --- a/clientapi/routing/auth_fallback.go +++ b/clientapi/routing/auth_fallback.go @@ -20,7 +20,7 @@ import ( "github.com/matrix-org/dendrite/clientapi/auth/authtypes" "github.com/matrix-org/dendrite/clientapi/jsonerror" - "github.com/matrix-org/dendrite/internal/config" + "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/util" ) diff --git a/clientapi/routing/createroom.go b/clientapi/routing/createroom.go index 8f29fbe74..5a2ffea34 100644 --- a/clientapi/routing/createroom.go +++ b/clientapi/routing/createroom.go @@ -28,8 +28,8 @@ import ( "github.com/matrix-org/dendrite/clientapi/httputil" "github.com/matrix-org/dendrite/clientapi/jsonerror" - "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/userapi/storage/accounts" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/util" diff --git a/clientapi/routing/directory.go b/clientapi/routing/directory.go index e64d6b233..1b844c4e4 100644 --- a/clientapi/routing/directory.go +++ b/clientapi/routing/directory.go @@ -21,8 +21,8 @@ import ( "github.com/matrix-org/dendrite/clientapi/httputil" "github.com/matrix-org/dendrite/clientapi/jsonerror" federationSenderAPI "github.com/matrix-org/dendrite/federationsender/api" - "github.com/matrix-org/dendrite/internal/config" roomserverAPI "github.com/matrix-org/dendrite/roomserver/api" + "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/dendrite/userapi/api" userapi "github.com/matrix-org/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib" diff --git a/clientapi/routing/directory_public.go b/clientapi/routing/directory_public.go index fd7bc1e86..2e3283be1 100644 --- a/clientapi/routing/directory_public.go +++ b/clientapi/routing/directory_public.go @@ -26,8 +26,8 @@ import ( "github.com/matrix-org/dendrite/clientapi/api" "github.com/matrix-org/dendrite/clientapi/httputil" "github.com/matrix-org/dendrite/clientapi/jsonerror" - "github.com/matrix-org/dendrite/internal/config" roomserverAPI "github.com/matrix-org/dendrite/roomserver/api" + "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/util" ) diff --git a/clientapi/routing/getevent.go b/clientapi/routing/getevent.go index cccab1ee7..29340cc04 100644 --- a/clientapi/routing/getevent.go +++ b/clientapi/routing/getevent.go @@ -18,8 +18,8 @@ import ( "net/http" "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" userapi "github.com/matrix-org/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/util" diff --git a/clientapi/routing/login.go b/clientapi/routing/login.go index f84f078dd..589efe0b2 100644 --- a/clientapi/routing/login.go +++ b/clientapi/routing/login.go @@ -22,7 +22,7 @@ import ( "github.com/matrix-org/dendrite/clientapi/httputil" "github.com/matrix-org/dendrite/clientapi/jsonerror" "github.com/matrix-org/dendrite/clientapi/userutil" - "github.com/matrix-org/dendrite/internal/config" + "github.com/matrix-org/dendrite/setup/config" userapi "github.com/matrix-org/dendrite/userapi/api" "github.com/matrix-org/dendrite/userapi/storage/accounts" "github.com/matrix-org/gomatrixserverlib" diff --git a/clientapi/routing/membership.go b/clientapi/routing/membership.go index 5ca202b66..bc679631a 100644 --- a/clientapi/routing/membership.go +++ b/clientapi/routing/membership.go @@ -25,10 +25,10 @@ import ( "github.com/matrix-org/dendrite/clientapi/httputil" "github.com/matrix-org/dendrite/clientapi/jsonerror" "github.com/matrix-org/dendrite/clientapi/threepid" - "github.com/matrix-org/dendrite/internal/config" "github.com/matrix-org/dendrite/internal/eventutil" "github.com/matrix-org/dendrite/roomserver/api" roomserverAPI "github.com/matrix-org/dendrite/roomserver/api" + "github.com/matrix-org/dendrite/setup/config" userapi "github.com/matrix-org/dendrite/userapi/api" "github.com/matrix-org/dendrite/userapi/storage/accounts" "github.com/matrix-org/gomatrixserverlib" diff --git a/clientapi/routing/memberships.go b/clientapi/routing/memberships.go index 613484875..457f81cbd 100644 --- a/clientapi/routing/memberships.go +++ b/clientapi/routing/memberships.go @@ -19,8 +19,8 @@ import ( "net/http" "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" userapi "github.com/matrix-org/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/util" diff --git a/clientapi/routing/password.go b/clientapi/routing/password.go index 8b81b9f02..87d5f8ff3 100644 --- a/clientapi/routing/password.go +++ b/clientapi/routing/password.go @@ -7,7 +7,7 @@ import ( "github.com/matrix-org/dendrite/clientapi/auth/authtypes" "github.com/matrix-org/dendrite/clientapi/httputil" "github.com/matrix-org/dendrite/clientapi/jsonerror" - "github.com/matrix-org/dendrite/internal/config" + "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/dendrite/userapi/api" userapi "github.com/matrix-org/dendrite/userapi/api" "github.com/matrix-org/dendrite/userapi/storage/accounts" diff --git a/clientapi/routing/profile.go b/clientapi/routing/profile.go index 971f23689..0d47c91ea 100644 --- a/clientapi/routing/profile.go +++ b/clientapi/routing/profile.go @@ -23,9 +23,9 @@ import ( "github.com/matrix-org/dendrite/clientapi/auth/authtypes" "github.com/matrix-org/dendrite/clientapi/httputil" "github.com/matrix-org/dendrite/clientapi/jsonerror" - "github.com/matrix-org/dendrite/internal/config" "github.com/matrix-org/dendrite/internal/eventutil" "github.com/matrix-org/dendrite/roomserver/api" + "github.com/matrix-org/dendrite/setup/config" userapi "github.com/matrix-org/dendrite/userapi/api" "github.com/matrix-org/dendrite/userapi/storage/accounts" "github.com/matrix-org/gomatrixserverlib" diff --git a/clientapi/routing/rate_limiting.go b/clientapi/routing/rate_limiting.go index 9d3f817a2..5291cabae 100644 --- a/clientapi/routing/rate_limiting.go +++ b/clientapi/routing/rate_limiting.go @@ -6,7 +6,7 @@ import ( "time" "github.com/matrix-org/dendrite/clientapi/jsonerror" - "github.com/matrix-org/dendrite/internal/config" + "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/util" ) diff --git a/clientapi/routing/redaction.go b/clientapi/routing/redaction.go index 7696bec0f..923759748 100644 --- a/clientapi/routing/redaction.go +++ b/clientapi/routing/redaction.go @@ -21,10 +21,10 @@ import ( "github.com/matrix-org/dendrite/clientapi/httputil" "github.com/matrix-org/dendrite/clientapi/jsonerror" - "github.com/matrix-org/dendrite/internal/config" "github.com/matrix-org/dendrite/internal/eventutil" "github.com/matrix-org/dendrite/roomserver/api" roomserverAPI "github.com/matrix-org/dendrite/roomserver/api" + "github.com/matrix-org/dendrite/setup/config" userapi "github.com/matrix-org/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/util" diff --git a/clientapi/routing/register.go b/clientapi/routing/register.go index 528537ef4..c6365c67b 100644 --- a/clientapi/routing/register.go +++ b/clientapi/routing/register.go @@ -32,8 +32,8 @@ import ( "sync" "time" - "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/clientapi/auth" "github.com/matrix-org/dendrite/clientapi/auth/authtypes" diff --git a/clientapi/routing/register_test.go b/clientapi/routing/register_test.go index 0a91ae0f1..ea07f30be 100644 --- a/clientapi/routing/register_test.go +++ b/clientapi/routing/register_test.go @@ -19,7 +19,7 @@ import ( "testing" "github.com/matrix-org/dendrite/clientapi/auth/authtypes" - "github.com/matrix-org/dendrite/internal/config" + "github.com/matrix-org/dendrite/setup/config" ) var ( diff --git a/clientapi/routing/routing.go b/clientapi/routing/routing.go index 65b622b3a..e6315b68f 100644 --- a/clientapi/routing/routing.go +++ b/clientapi/routing/routing.go @@ -28,11 +28,11 @@ import ( "github.com/matrix-org/dendrite/clientapi/producers" eduServerAPI "github.com/matrix-org/dendrite/eduserver/api" federationSenderAPI "github.com/matrix-org/dendrite/federationsender/api" - "github.com/matrix-org/dendrite/internal/config" "github.com/matrix-org/dendrite/internal/httputil" "github.com/matrix-org/dendrite/internal/transactions" keyserverAPI "github.com/matrix-org/dendrite/keyserver/api" roomserverAPI "github.com/matrix-org/dendrite/roomserver/api" + "github.com/matrix-org/dendrite/setup/config" userapi "github.com/matrix-org/dendrite/userapi/api" "github.com/matrix-org/dendrite/userapi/storage/accounts" "github.com/matrix-org/gomatrixserverlib" diff --git a/clientapi/routing/sendevent.go b/clientapi/routing/sendevent.go index a4240cf34..bfb48f3df 100644 --- a/clientapi/routing/sendevent.go +++ b/clientapi/routing/sendevent.go @@ -20,10 +20,10 @@ import ( "github.com/matrix-org/dendrite/clientapi/httputil" "github.com/matrix-org/dendrite/clientapi/jsonerror" - "github.com/matrix-org/dendrite/internal/config" "github.com/matrix-org/dendrite/internal/eventutil" "github.com/matrix-org/dendrite/internal/transactions" "github.com/matrix-org/dendrite/roomserver/api" + "github.com/matrix-org/dendrite/setup/config" userapi "github.com/matrix-org/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/util" diff --git a/clientapi/routing/threepid.go b/clientapi/routing/threepid.go index 54ffa53f6..f4d233798 100644 --- a/clientapi/routing/threepid.go +++ b/clientapi/routing/threepid.go @@ -21,7 +21,7 @@ import ( "github.com/matrix-org/dendrite/clientapi/httputil" "github.com/matrix-org/dendrite/clientapi/jsonerror" "github.com/matrix-org/dendrite/clientapi/threepid" - "github.com/matrix-org/dendrite/internal/config" + "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/dendrite/userapi/api" "github.com/matrix-org/dendrite/userapi/storage/accounts" diff --git a/clientapi/routing/voip.go b/clientapi/routing/voip.go index 536c69fba..13dca7ac0 100644 --- a/clientapi/routing/voip.go +++ b/clientapi/routing/voip.go @@ -23,7 +23,7 @@ import ( "time" "github.com/matrix-org/dendrite/clientapi/jsonerror" - "github.com/matrix-org/dendrite/internal/config" + "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/dendrite/userapi/api" "github.com/matrix-org/gomatrix" "github.com/matrix-org/util" diff --git a/clientapi/threepid/invites.go b/clientapi/threepid/invites.go index f49796fde..53cd6b8ca 100644 --- a/clientapi/threepid/invites.go +++ b/clientapi/threepid/invites.go @@ -25,9 +25,9 @@ import ( "time" "github.com/matrix-org/dendrite/clientapi/auth/authtypes" - "github.com/matrix-org/dendrite/internal/config" "github.com/matrix-org/dendrite/internal/eventutil" "github.com/matrix-org/dendrite/roomserver/api" + "github.com/matrix-org/dendrite/setup/config" userapi "github.com/matrix-org/dendrite/userapi/api" "github.com/matrix-org/dendrite/userapi/storage/accounts" "github.com/matrix-org/gomatrixserverlib" diff --git a/clientapi/threepid/threepid.go b/clientapi/threepid/threepid.go index 40fd161d6..2f817ef42 100644 --- a/clientapi/threepid/threepid.go +++ b/clientapi/threepid/threepid.go @@ -24,7 +24,7 @@ import ( "strconv" "strings" - "github.com/matrix-org/dendrite/internal/config" + "github.com/matrix-org/dendrite/setup/config" ) // EmailAssociationRequest represents the request defined at https://matrix.org/docs/spec/client_server/r0.2.0.html#post-matrix-client-r0-register-email-requesttoken diff --git a/cmd/create-account/main.go b/cmd/create-account/main.go index f6de2d0d4..6aa1e7281 100644 --- a/cmd/create-account/main.go +++ b/cmd/create-account/main.go @@ -20,7 +20,7 @@ import ( "fmt" "os" - "github.com/matrix-org/dendrite/internal/config" + "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/dendrite/userapi/storage/accounts" "github.com/matrix-org/gomatrixserverlib" ) diff --git a/cmd/dendrite-demo-libp2p/main.go b/cmd/dendrite-demo-libp2p/main.go index 61fdd801a..9aae34e38 100644 --- a/cmd/dendrite-demo-libp2p/main.go +++ b/cmd/dendrite-demo-libp2p/main.go @@ -31,11 +31,11 @@ import ( "github.com/matrix-org/dendrite/cmd/dendrite-demo-yggdrasil/embed" "github.com/matrix-org/dendrite/eduserver" "github.com/matrix-org/dendrite/federationsender" - "github.com/matrix-org/dendrite/internal/config" "github.com/matrix-org/dendrite/internal/httputil" - "github.com/matrix-org/dendrite/internal/setup" "github.com/matrix-org/dendrite/keyserver" "github.com/matrix-org/dendrite/roomserver" + "github.com/matrix-org/dendrite/setup" + "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/dendrite/signingkeyserver" "github.com/matrix-org/dendrite/userapi" "github.com/matrix-org/gomatrixserverlib" diff --git a/cmd/dendrite-demo-libp2p/p2pdendrite.go b/cmd/dendrite-demo-libp2p/p2pdendrite.go index 8fff46af1..45eb42a9c 100644 --- a/cmd/dendrite-demo-libp2p/p2pdendrite.go +++ b/cmd/dendrite-demo-libp2p/p2pdendrite.go @@ -22,7 +22,7 @@ import ( pstore "github.com/libp2p/go-libp2p-core/peerstore" record "github.com/libp2p/go-libp2p-record" - "github.com/matrix-org/dendrite/internal/setup" + "github.com/matrix-org/dendrite/setup" "github.com/libp2p/go-libp2p" circuit "github.com/libp2p/go-libp2p-circuit" @@ -34,7 +34,7 @@ import ( pubsub "github.com/libp2p/go-libp2p-pubsub" "github.com/matrix-org/gomatrixserverlib" - "github.com/matrix-org/dendrite/internal/config" + "github.com/matrix-org/dendrite/setup/config" ) // P2PDendrite is a Peer-to-Peer variant of BaseDendrite. diff --git a/cmd/dendrite-demo-yggdrasil/main.go b/cmd/dendrite-demo-yggdrasil/main.go index a40973638..39643cc2f 100644 --- a/cmd/dendrite-demo-yggdrasil/main.go +++ b/cmd/dendrite-demo-yggdrasil/main.go @@ -34,11 +34,11 @@ import ( "github.com/matrix-org/dendrite/federationsender" "github.com/matrix-org/dendrite/federationsender/api" "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/config" "github.com/matrix-org/dendrite/internal/httputil" - "github.com/matrix-org/dendrite/internal/setup" "github.com/matrix-org/dendrite/keyserver" "github.com/matrix-org/dendrite/roomserver" + "github.com/matrix-org/dendrite/setup" + "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/dendrite/userapi" "github.com/matrix-org/gomatrixserverlib" diff --git a/cmd/dendrite-demo-yggdrasil/yggconn/client.go b/cmd/dendrite-demo-yggdrasil/yggconn/client.go index a5f89439d..ea51f4b17 100644 --- a/cmd/dendrite-demo-yggdrasil/yggconn/client.go +++ b/cmd/dendrite-demo-yggdrasil/yggconn/client.go @@ -4,7 +4,7 @@ import ( "net/http" "time" - "github.com/matrix-org/dendrite/internal/setup" + "github.com/matrix-org/dendrite/setup" "github.com/matrix-org/gomatrixserverlib" ) diff --git a/cmd/dendrite-monolith-server/main.go b/cmd/dendrite-monolith-server/main.go index 70b81bbc8..a1ade7893 100644 --- a/cmd/dendrite-monolith-server/main.go +++ b/cmd/dendrite-monolith-server/main.go @@ -22,12 +22,12 @@ import ( "github.com/matrix-org/dendrite/eduserver" "github.com/matrix-org/dendrite/eduserver/cache" "github.com/matrix-org/dendrite/federationsender" - "github.com/matrix-org/dendrite/internal/config" - "github.com/matrix-org/dendrite/internal/mscs" - "github.com/matrix-org/dendrite/internal/setup" "github.com/matrix-org/dendrite/keyserver" "github.com/matrix-org/dendrite/roomserver" "github.com/matrix-org/dendrite/roomserver/api" + "github.com/matrix-org/dendrite/setup" + "github.com/matrix-org/dendrite/setup/config" + "github.com/matrix-org/dendrite/setup/mscs" "github.com/matrix-org/dendrite/signingkeyserver" "github.com/matrix-org/dendrite/userapi" "github.com/sirupsen/logrus" diff --git a/cmd/dendrite-polylith-multi/main.go b/cmd/dendrite-polylith-multi/main.go index 0d6406c01..979ab4367 100644 --- a/cmd/dendrite-polylith-multi/main.go +++ b/cmd/dendrite-polylith-multi/main.go @@ -20,8 +20,8 @@ import ( "strings" "github.com/matrix-org/dendrite/cmd/dendrite-polylith-multi/personalities" - "github.com/matrix-org/dendrite/internal/config" - "github.com/matrix-org/dendrite/internal/setup" + "github.com/matrix-org/dendrite/setup" + "github.com/matrix-org/dendrite/setup/config" "github.com/sirupsen/logrus" ) diff --git a/cmd/dendrite-polylith-multi/personalities/appservice.go b/cmd/dendrite-polylith-multi/personalities/appservice.go index 7fa87b115..d269b15d4 100644 --- a/cmd/dendrite-polylith-multi/personalities/appservice.go +++ b/cmd/dendrite-polylith-multi/personalities/appservice.go @@ -16,8 +16,8 @@ package personalities import ( "github.com/matrix-org/dendrite/appservice" - "github.com/matrix-org/dendrite/internal/config" - "github.com/matrix-org/dendrite/internal/setup" + "github.com/matrix-org/dendrite/setup" + "github.com/matrix-org/dendrite/setup/config" ) func Appservice(base *setup.BaseDendrite, cfg *config.Dendrite) { diff --git a/cmd/dendrite-polylith-multi/personalities/clientapi.go b/cmd/dendrite-polylith-multi/personalities/clientapi.go index 09fc63ab3..b3cc411b3 100644 --- a/cmd/dendrite-polylith-multi/personalities/clientapi.go +++ b/cmd/dendrite-polylith-multi/personalities/clientapi.go @@ -16,9 +16,9 @@ package personalities import ( "github.com/matrix-org/dendrite/clientapi" - "github.com/matrix-org/dendrite/internal/config" - "github.com/matrix-org/dendrite/internal/setup" "github.com/matrix-org/dendrite/internal/transactions" + "github.com/matrix-org/dendrite/setup" + "github.com/matrix-org/dendrite/setup/config" ) func ClientAPI(base *setup.BaseDendrite, cfg *config.Dendrite) { diff --git a/cmd/dendrite-polylith-multi/personalities/eduserver.go b/cmd/dendrite-polylith-multi/personalities/eduserver.go index a5d2926f1..55b986e8f 100644 --- a/cmd/dendrite-polylith-multi/personalities/eduserver.go +++ b/cmd/dendrite-polylith-multi/personalities/eduserver.go @@ -17,8 +17,8 @@ package personalities import ( "github.com/matrix-org/dendrite/eduserver" "github.com/matrix-org/dendrite/eduserver/cache" - "github.com/matrix-org/dendrite/internal/config" - "github.com/matrix-org/dendrite/internal/setup" + "github.com/matrix-org/dendrite/setup" + "github.com/matrix-org/dendrite/setup/config" ) func EDUServer(base *setup.BaseDendrite, cfg *config.Dendrite) { diff --git a/cmd/dendrite-polylith-multi/personalities/federationapi.go b/cmd/dendrite-polylith-multi/personalities/federationapi.go index a1bbeafad..7957b211f 100644 --- a/cmd/dendrite-polylith-multi/personalities/federationapi.go +++ b/cmd/dendrite-polylith-multi/personalities/federationapi.go @@ -16,8 +16,8 @@ package personalities import ( "github.com/matrix-org/dendrite/federationapi" - "github.com/matrix-org/dendrite/internal/config" - "github.com/matrix-org/dendrite/internal/setup" + "github.com/matrix-org/dendrite/setup" + "github.com/matrix-org/dendrite/setup/config" ) func FederationAPI(base *setup.BaseDendrite, cfg *config.Dendrite) { diff --git a/cmd/dendrite-polylith-multi/personalities/federationsender.go b/cmd/dendrite-polylith-multi/personalities/federationsender.go index 052523789..f8b6d3004 100644 --- a/cmd/dendrite-polylith-multi/personalities/federationsender.go +++ b/cmd/dendrite-polylith-multi/personalities/federationsender.go @@ -16,8 +16,8 @@ package personalities import ( "github.com/matrix-org/dendrite/federationsender" - "github.com/matrix-org/dendrite/internal/config" - "github.com/matrix-org/dendrite/internal/setup" + "github.com/matrix-org/dendrite/setup" + "github.com/matrix-org/dendrite/setup/config" ) func FederationSender(base *setup.BaseDendrite, cfg *config.Dendrite) { diff --git a/cmd/dendrite-polylith-multi/personalities/keyserver.go b/cmd/dendrite-polylith-multi/personalities/keyserver.go index 6a7907602..d7fc9f4fb 100644 --- a/cmd/dendrite-polylith-multi/personalities/keyserver.go +++ b/cmd/dendrite-polylith-multi/personalities/keyserver.go @@ -15,9 +15,9 @@ package personalities import ( - "github.com/matrix-org/dendrite/internal/config" - "github.com/matrix-org/dendrite/internal/setup" "github.com/matrix-org/dendrite/keyserver" + "github.com/matrix-org/dendrite/setup" + "github.com/matrix-org/dendrite/setup/config" ) func KeyServer(base *setup.BaseDendrite, cfg *config.Dendrite) { diff --git a/cmd/dendrite-polylith-multi/personalities/mediaapi.go b/cmd/dendrite-polylith-multi/personalities/mediaapi.go index 64e5bc312..cf3e6882b 100644 --- a/cmd/dendrite-polylith-multi/personalities/mediaapi.go +++ b/cmd/dendrite-polylith-multi/personalities/mediaapi.go @@ -15,9 +15,9 @@ package personalities import ( - "github.com/matrix-org/dendrite/internal/config" - "github.com/matrix-org/dendrite/internal/setup" "github.com/matrix-org/dendrite/mediaapi" + "github.com/matrix-org/dendrite/setup" + "github.com/matrix-org/dendrite/setup/config" ) func MediaAPI(base *setup.BaseDendrite, cfg *config.Dendrite) { diff --git a/cmd/dendrite-polylith-multi/personalities/roomserver.go b/cmd/dendrite-polylith-multi/personalities/roomserver.go index 91027506d..cf52a5c22 100644 --- a/cmd/dendrite-polylith-multi/personalities/roomserver.go +++ b/cmd/dendrite-polylith-multi/personalities/roomserver.go @@ -15,9 +15,9 @@ package personalities import ( - "github.com/matrix-org/dendrite/internal/config" - "github.com/matrix-org/dendrite/internal/setup" "github.com/matrix-org/dendrite/roomserver" + "github.com/matrix-org/dendrite/setup" + "github.com/matrix-org/dendrite/setup/config" ) func RoomServer(base *setup.BaseDendrite, cfg *config.Dendrite) { diff --git a/cmd/dendrite-polylith-multi/personalities/signingkeyserver.go b/cmd/dendrite-polylith-multi/personalities/signingkeyserver.go index a7bfff10b..0a7fc502a 100644 --- a/cmd/dendrite-polylith-multi/personalities/signingkeyserver.go +++ b/cmd/dendrite-polylith-multi/personalities/signingkeyserver.go @@ -15,8 +15,8 @@ package personalities import ( - "github.com/matrix-org/dendrite/internal/config" - "github.com/matrix-org/dendrite/internal/setup" + "github.com/matrix-org/dendrite/setup" + "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/dendrite/signingkeyserver" ) diff --git a/cmd/dendrite-polylith-multi/personalities/syncapi.go b/cmd/dendrite-polylith-multi/personalities/syncapi.go index 2d5c0b525..1c33286e2 100644 --- a/cmd/dendrite-polylith-multi/personalities/syncapi.go +++ b/cmd/dendrite-polylith-multi/personalities/syncapi.go @@ -15,8 +15,8 @@ package personalities import ( - "github.com/matrix-org/dendrite/internal/config" - "github.com/matrix-org/dendrite/internal/setup" + "github.com/matrix-org/dendrite/setup" + "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/dendrite/syncapi" ) diff --git a/cmd/dendrite-polylith-multi/personalities/userapi.go b/cmd/dendrite-polylith-multi/personalities/userapi.go index fe5e4fbd0..6feb906d3 100644 --- a/cmd/dendrite-polylith-multi/personalities/userapi.go +++ b/cmd/dendrite-polylith-multi/personalities/userapi.go @@ -15,8 +15,8 @@ package personalities import ( - "github.com/matrix-org/dendrite/internal/config" - "github.com/matrix-org/dendrite/internal/setup" + "github.com/matrix-org/dendrite/setup" + "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/dendrite/userapi" ) diff --git a/cmd/dendritejs/main.go b/cmd/dendritejs/main.go index 85cc8a9fb..f247bc241 100644 --- a/cmd/dendritejs/main.go +++ b/cmd/dendritejs/main.go @@ -26,11 +26,11 @@ import ( "github.com/matrix-org/dendrite/eduserver" "github.com/matrix-org/dendrite/eduserver/cache" "github.com/matrix-org/dendrite/federationsender" - "github.com/matrix-org/dendrite/internal/config" "github.com/matrix-org/dendrite/internal/httputil" - "github.com/matrix-org/dendrite/internal/setup" "github.com/matrix-org/dendrite/keyserver" "github.com/matrix-org/dendrite/roomserver" + "github.com/matrix-org/dendrite/setup" + "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/dendrite/userapi" go_http_js_libp2p "github.com/matrix-org/go-http-js-libp2p" diff --git a/cmd/generate-config/main.go b/cmd/generate-config/main.go index e65723e65..3233cf809 100644 --- a/cmd/generate-config/main.go +++ b/cmd/generate-config/main.go @@ -4,7 +4,7 @@ import ( "flag" "fmt" - "github.com/matrix-org/dendrite/internal/config" + "github.com/matrix-org/dendrite/setup/config" "gopkg.in/yaml.v2" ) diff --git a/cmd/resolve-state/main.go b/cmd/resolve-state/main.go index a622fbf28..efa583331 100644 --- a/cmd/resolve-state/main.go +++ b/cmd/resolve-state/main.go @@ -8,10 +8,10 @@ import ( "strconv" "github.com/matrix-org/dendrite/internal/caching" - "github.com/matrix-org/dendrite/internal/setup" "github.com/matrix-org/dendrite/roomserver/state" "github.com/matrix-org/dendrite/roomserver/storage" "github.com/matrix-org/dendrite/roomserver/types" + "github.com/matrix-org/dendrite/setup" "github.com/matrix-org/gomatrixserverlib" ) diff --git a/cmd/roomserver-integration-tests/main.go b/cmd/roomserver-integration-tests/main.go index 41ea6f4d8..ff3f06b6e 100644 --- a/cmd/roomserver-integration-tests/main.go +++ b/cmd/roomserver-integration-tests/main.go @@ -29,10 +29,10 @@ import ( "net/http" "github.com/matrix-org/dendrite/internal/caching" - "github.com/matrix-org/dendrite/internal/config" "github.com/matrix-org/dendrite/internal/test" "github.com/matrix-org/dendrite/roomserver/api" "github.com/matrix-org/dendrite/roomserver/inthttp" + "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/gomatrixserverlib" ) diff --git a/cmd/syncserver-integration-tests/main.go b/cmd/syncserver-integration-tests/main.go index cbbcaa7e0..332bde10e 100644 --- a/cmd/syncserver-integration-tests/main.go +++ b/cmd/syncserver-integration-tests/main.go @@ -24,9 +24,9 @@ import ( "path/filepath" "time" - "github.com/matrix-org/dendrite/internal/config" "github.com/matrix-org/dendrite/internal/test" "github.com/matrix-org/dendrite/roomserver/api" + "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/gomatrixserverlib" ) diff --git a/eduserver/eduserver.go b/eduserver/eduserver.go index d5ab36818..7cc405108 100644 --- a/eduserver/eduserver.go +++ b/eduserver/eduserver.go @@ -22,9 +22,9 @@ import ( "github.com/matrix-org/dendrite/eduserver/cache" "github.com/matrix-org/dendrite/eduserver/input" "github.com/matrix-org/dendrite/eduserver/inthttp" - "github.com/matrix-org/dendrite/internal/config" - "github.com/matrix-org/dendrite/internal/setup" - "github.com/matrix-org/dendrite/internal/setup/kafka" + "github.com/matrix-org/dendrite/setup" + "github.com/matrix-org/dendrite/setup/config" + "github.com/matrix-org/dendrite/setup/kafka" userapi "github.com/matrix-org/dendrite/userapi/api" ) diff --git a/federationapi/federationapi.go b/federationapi/federationapi.go index 944e2797c..350d58538 100644 --- a/federationapi/federationapi.go +++ b/federationapi/federationapi.go @@ -18,9 +18,9 @@ import ( "github.com/gorilla/mux" eduserverAPI "github.com/matrix-org/dendrite/eduserver/api" federationSenderAPI "github.com/matrix-org/dendrite/federationsender/api" - "github.com/matrix-org/dendrite/internal/config" keyserverAPI "github.com/matrix-org/dendrite/keyserver/api" roomserverAPI "github.com/matrix-org/dendrite/roomserver/api" + "github.com/matrix-org/dendrite/setup/config" userapi "github.com/matrix-org/dendrite/userapi/api" "github.com/matrix-org/dendrite/federationapi/routing" diff --git a/federationapi/federationapi_test.go b/federationapi/federationapi_test.go index 00101fe95..aed47a362 100644 --- a/federationapi/federationapi_test.go +++ b/federationapi/federationapi_test.go @@ -7,9 +7,9 @@ import ( "testing" "github.com/matrix-org/dendrite/federationapi" - "github.com/matrix-org/dendrite/internal/config" - "github.com/matrix-org/dendrite/internal/setup" "github.com/matrix-org/dendrite/internal/test" + "github.com/matrix-org/dendrite/setup" + "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/gomatrix" "github.com/matrix-org/gomatrixserverlib" ) diff --git a/federationapi/routing/backfill.go b/federationapi/routing/backfill.go index 717289a2a..31005209f 100644 --- a/federationapi/routing/backfill.go +++ b/federationapi/routing/backfill.go @@ -22,8 +22,8 @@ import ( "time" "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/gomatrixserverlib" "github.com/matrix-org/util" ) diff --git a/federationapi/routing/invite.go b/federationapi/routing/invite.go index 54f9e6848..8795118ee 100644 --- a/federationapi/routing/invite.go +++ b/federationapi/routing/invite.go @@ -21,9 +21,9 @@ import ( "net/http" "github.com/matrix-org/dendrite/clientapi/jsonerror" - "github.com/matrix-org/dendrite/internal/config" "github.com/matrix-org/dendrite/roomserver/api" roomserverVersion "github.com/matrix-org/dendrite/roomserver/version" + "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/util" ) diff --git a/federationapi/routing/join.go b/federationapi/routing/join.go index c8e7e627b..3afc8d5e1 100644 --- a/federationapi/routing/join.go +++ b/federationapi/routing/join.go @@ -21,9 +21,9 @@ import ( "time" "github.com/matrix-org/dendrite/clientapi/jsonerror" - "github.com/matrix-org/dendrite/internal/config" "github.com/matrix-org/dendrite/internal/eventutil" "github.com/matrix-org/dendrite/roomserver/api" + "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/util" ) diff --git a/federationapi/routing/keys.go b/federationapi/routing/keys.go index 4779bcb2b..1f39094bc 100644 --- a/federationapi/routing/keys.go +++ b/federationapi/routing/keys.go @@ -22,8 +22,8 @@ import ( "github.com/matrix-org/dendrite/clientapi/httputil" "github.com/matrix-org/dendrite/clientapi/jsonerror" federationSenderAPI "github.com/matrix-org/dendrite/federationsender/api" - "github.com/matrix-org/dendrite/internal/config" "github.com/matrix-org/dendrite/keyserver/api" + "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/util" "github.com/sirupsen/logrus" diff --git a/federationapi/routing/leave.go b/federationapi/routing/leave.go index 498532de0..1a8542618 100644 --- a/federationapi/routing/leave.go +++ b/federationapi/routing/leave.go @@ -17,9 +17,9 @@ import ( "time" "github.com/matrix-org/dendrite/clientapi/jsonerror" - "github.com/matrix-org/dendrite/internal/config" "github.com/matrix-org/dendrite/internal/eventutil" "github.com/matrix-org/dendrite/roomserver/api" + "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/util" ) diff --git a/federationapi/routing/profile.go b/federationapi/routing/profile.go index f1d90bbf4..dbc209ce1 100644 --- a/federationapi/routing/profile.go +++ b/federationapi/routing/profile.go @@ -19,8 +19,8 @@ import ( "net/http" "github.com/matrix-org/dendrite/clientapi/jsonerror" - "github.com/matrix-org/dendrite/internal/config" "github.com/matrix-org/dendrite/internal/eventutil" + "github.com/matrix-org/dendrite/setup/config" userapi "github.com/matrix-org/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/util" diff --git a/federationapi/routing/query.go b/federationapi/routing/query.go index 99b5460bc..6c25b4d3f 100644 --- a/federationapi/routing/query.go +++ b/federationapi/routing/query.go @@ -20,8 +20,8 @@ import ( "github.com/matrix-org/dendrite/clientapi/jsonerror" federationSenderAPI "github.com/matrix-org/dendrite/federationsender/api" - "github.com/matrix-org/dendrite/internal/config" roomserverAPI "github.com/matrix-org/dendrite/roomserver/api" + "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/gomatrix" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/util" diff --git a/federationapi/routing/routing.go b/federationapi/routing/routing.go index 06ed57af6..c957e26d0 100644 --- a/federationapi/routing/routing.go +++ b/federationapi/routing/routing.go @@ -21,10 +21,10 @@ import ( "github.com/matrix-org/dendrite/clientapi/jsonerror" eduserverAPI "github.com/matrix-org/dendrite/eduserver/api" federationSenderAPI "github.com/matrix-org/dendrite/federationsender/api" - "github.com/matrix-org/dendrite/internal/config" "github.com/matrix-org/dendrite/internal/httputil" keyserverAPI "github.com/matrix-org/dendrite/keyserver/api" roomserverAPI "github.com/matrix-org/dendrite/roomserver/api" + "github.com/matrix-org/dendrite/setup/config" userapi "github.com/matrix-org/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/util" diff --git a/federationapi/routing/send.go b/federationapi/routing/send.go index a3011b500..f50b9c3d6 100644 --- a/federationapi/routing/send.go +++ b/federationapi/routing/send.go @@ -25,9 +25,9 @@ import ( "github.com/matrix-org/dendrite/clientapi/jsonerror" eduserverAPI "github.com/matrix-org/dendrite/eduserver/api" - "github.com/matrix-org/dendrite/internal/config" 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/gomatrixserverlib" "github.com/matrix-org/util" "github.com/sirupsen/logrus" diff --git a/federationapi/routing/threepid.go b/federationapi/routing/threepid.go index ed6af526e..5ba28881c 100644 --- a/federationapi/routing/threepid.go +++ b/federationapi/routing/threepid.go @@ -23,8 +23,8 @@ import ( "github.com/matrix-org/dendrite/clientapi/httputil" "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" userapi "github.com/matrix-org/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib" diff --git a/federationsender/consumers/eduserver.go b/federationsender/consumers/eduserver.go index 9d7574e68..6d11eb88a 100644 --- a/federationsender/consumers/eduserver.go +++ b/federationsender/consumers/eduserver.go @@ -24,7 +24,7 @@ import ( "github.com/matrix-org/dendrite/federationsender/queue" "github.com/matrix-org/dendrite/federationsender/storage" "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/config" + "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/util" log "github.com/sirupsen/logrus" diff --git a/federationsender/consumers/keychange.go b/federationsender/consumers/keychange.go index 28244e923..5006ac28d 100644 --- a/federationsender/consumers/keychange.go +++ b/federationsender/consumers/keychange.go @@ -23,9 +23,9 @@ import ( "github.com/matrix-org/dendrite/federationsender/queue" "github.com/matrix-org/dendrite/federationsender/storage" "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/config" "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/gomatrixserverlib" log "github.com/sirupsen/logrus" ) diff --git a/federationsender/consumers/roomserver.go b/federationsender/consumers/roomserver.go index 873c1e981..13c415bc7 100644 --- a/federationsender/consumers/roomserver.go +++ b/federationsender/consumers/roomserver.go @@ -24,8 +24,8 @@ import ( "github.com/matrix-org/dendrite/federationsender/storage" "github.com/matrix-org/dendrite/federationsender/types" "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/gomatrixserverlib" log "github.com/sirupsen/logrus" ) diff --git a/federationsender/federationsender.go b/federationsender/federationsender.go index 7b75cb372..fc0ba6d5f 100644 --- a/federationsender/federationsender.go +++ b/federationsender/federationsender.go @@ -23,9 +23,9 @@ import ( "github.com/matrix-org/dendrite/federationsender/queue" "github.com/matrix-org/dendrite/federationsender/statistics" "github.com/matrix-org/dendrite/federationsender/storage" - "github.com/matrix-org/dendrite/internal/setup" - "github.com/matrix-org/dendrite/internal/setup/kafka" roomserverAPI "github.com/matrix-org/dendrite/roomserver/api" + "github.com/matrix-org/dendrite/setup" + "github.com/matrix-org/dendrite/setup/kafka" "github.com/matrix-org/gomatrixserverlib" "github.com/sirupsen/logrus" ) diff --git a/federationsender/internal/api.go b/federationsender/internal/api.go index 31617045e..a14cf3caa 100644 --- a/federationsender/internal/api.go +++ b/federationsender/internal/api.go @@ -9,8 +9,8 @@ import ( "github.com/matrix-org/dendrite/federationsender/queue" "github.com/matrix-org/dendrite/federationsender/statistics" "github.com/matrix-org/dendrite/federationsender/storage" - "github.com/matrix-org/dendrite/internal/config" roomserverAPI "github.com/matrix-org/dendrite/roomserver/api" + "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/gomatrix" "github.com/matrix-org/gomatrixserverlib" ) diff --git a/federationsender/storage/postgres/storage.go b/federationsender/storage/postgres/storage.go index b3b4da398..f314f8493 100644 --- a/federationsender/storage/postgres/storage.go +++ b/federationsender/storage/postgres/storage.go @@ -19,8 +19,8 @@ import ( "database/sql" "github.com/matrix-org/dendrite/federationsender/storage/shared" - "github.com/matrix-org/dendrite/internal/config" "github.com/matrix-org/dendrite/internal/sqlutil" + "github.com/matrix-org/dendrite/setup/config" ) // Database stores information needed by the federation sender diff --git a/federationsender/storage/sqlite3/storage.go b/federationsender/storage/sqlite3/storage.go index ba467f026..4f663f645 100644 --- a/federationsender/storage/sqlite3/storage.go +++ b/federationsender/storage/sqlite3/storage.go @@ -21,8 +21,8 @@ import ( _ "github.com/mattn/go-sqlite3" "github.com/matrix-org/dendrite/federationsender/storage/shared" - "github.com/matrix-org/dendrite/internal/config" "github.com/matrix-org/dendrite/internal/sqlutil" + "github.com/matrix-org/dendrite/setup/config" ) // Database stores information needed by the federation sender diff --git a/federationsender/storage/storage.go b/federationsender/storage/storage.go index 1380fefd1..f36138229 100644 --- a/federationsender/storage/storage.go +++ b/federationsender/storage/storage.go @@ -21,7 +21,7 @@ import ( "github.com/matrix-org/dendrite/federationsender/storage/postgres" "github.com/matrix-org/dendrite/federationsender/storage/sqlite3" - "github.com/matrix-org/dendrite/internal/config" + "github.com/matrix-org/dendrite/setup/config" ) // NewDatabase opens a new database diff --git a/federationsender/storage/storage_wasm.go b/federationsender/storage/storage_wasm.go index 459329e97..c35b4828c 100644 --- a/federationsender/storage/storage_wasm.go +++ b/federationsender/storage/storage_wasm.go @@ -18,7 +18,7 @@ import ( "fmt" "github.com/matrix-org/dendrite/federationsender/storage/sqlite3" - "github.com/matrix-org/dendrite/internal/config" + "github.com/matrix-org/dendrite/setup/config" ) // NewDatabase opens a new database diff --git a/internal/eventutil/events.go b/internal/eventutil/events.go index a650b4b3a..b8691c50d 100644 --- a/internal/eventutil/events.go +++ b/internal/eventutil/events.go @@ -20,8 +20,8 @@ import ( "fmt" "time" - "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/gomatrixserverlib" ) diff --git a/internal/log.go b/internal/log.go index fd2b84ab9..0f374bd4a 100644 --- a/internal/log.go +++ b/internal/log.go @@ -27,7 +27,7 @@ import ( "github.com/matrix-org/util" - "github.com/matrix-org/dendrite/internal/config" + "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/dugong" "github.com/sirupsen/logrus" ) diff --git a/internal/sqlutil/migrate.go b/internal/sqlutil/migrate.go index 833977ba4..62b1c8fad 100644 --- a/internal/sqlutil/migrate.go +++ b/internal/sqlutil/migrate.go @@ -6,7 +6,7 @@ import ( "runtime" "sort" - "github.com/matrix-org/dendrite/internal/config" + "github.com/matrix-org/dendrite/setup/config" "github.com/pressly/goose" ) diff --git a/internal/sqlutil/trace.go b/internal/sqlutil/trace.go index 0684e92e1..ad0044559 100644 --- a/internal/sqlutil/trace.go +++ b/internal/sqlutil/trace.go @@ -28,7 +28,7 @@ import ( "sync" "time" - "github.com/matrix-org/dendrite/internal/config" + "github.com/matrix-org/dendrite/setup/config" "github.com/ngrok/sqlmw" "github.com/sirupsen/logrus" ) diff --git a/internal/sqlutil/uri.go b/internal/sqlutil/uri.go index e2c825d9d..44910f4a9 100644 --- a/internal/sqlutil/uri.go +++ b/internal/sqlutil/uri.go @@ -19,7 +19,7 @@ import ( "fmt" "net/url" - "github.com/matrix-org/dendrite/internal/config" + "github.com/matrix-org/dendrite/setup/config" ) // ParseFileURI returns the filepath in the given file: URI. Specifically, this will handle diff --git a/internal/test/config.go b/internal/test/config.go index 69fc5a873..7e68d6d2e 100644 --- a/internal/test/config.go +++ b/internal/test/config.go @@ -28,7 +28,7 @@ import ( "strings" "time" - "github.com/matrix-org/dendrite/internal/config" + "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/gomatrixserverlib" "gopkg.in/yaml.v2" ) diff --git a/internal/test/server.go b/internal/test/server.go index ed4e7e28e..ca14ea1bf 100644 --- a/internal/test/server.go +++ b/internal/test/server.go @@ -26,7 +26,7 @@ import ( "sync" "testing" - "github.com/matrix-org/dendrite/internal/config" + "github.com/matrix-org/dendrite/setup/config" ) // Defaulting allows assignment of string variables with a fallback default value diff --git a/keyserver/keyserver.go b/keyserver/keyserver.go index 6c54d2a08..7e8fc2e0d 100644 --- a/keyserver/keyserver.go +++ b/keyserver/keyserver.go @@ -17,13 +17,13 @@ package keyserver import ( "github.com/gorilla/mux" fedsenderapi "github.com/matrix-org/dendrite/federationsender/api" - "github.com/matrix-org/dendrite/internal/config" - "github.com/matrix-org/dendrite/internal/setup/kafka" "github.com/matrix-org/dendrite/keyserver/api" "github.com/matrix-org/dendrite/keyserver/internal" "github.com/matrix-org/dendrite/keyserver/inthttp" "github.com/matrix-org/dendrite/keyserver/producers" "github.com/matrix-org/dendrite/keyserver/storage" + "github.com/matrix-org/dendrite/setup/config" + "github.com/matrix-org/dendrite/setup/kafka" "github.com/sirupsen/logrus" ) diff --git a/keyserver/storage/postgres/storage.go b/keyserver/storage/postgres/storage.go index 783303c0e..cb16ffaa7 100644 --- a/keyserver/storage/postgres/storage.go +++ b/keyserver/storage/postgres/storage.go @@ -15,9 +15,9 @@ package postgres import ( - "github.com/matrix-org/dendrite/internal/config" "github.com/matrix-org/dendrite/internal/sqlutil" "github.com/matrix-org/dendrite/keyserver/storage/shared" + "github.com/matrix-org/dendrite/setup/config" ) // NewDatabase creates a new sync server database diff --git a/keyserver/storage/sqlite3/storage.go b/keyserver/storage/sqlite3/storage.go index 1d5382c06..ca1e7560c 100644 --- a/keyserver/storage/sqlite3/storage.go +++ b/keyserver/storage/sqlite3/storage.go @@ -15,9 +15,9 @@ package sqlite3 import ( - "github.com/matrix-org/dendrite/internal/config" "github.com/matrix-org/dendrite/internal/sqlutil" "github.com/matrix-org/dendrite/keyserver/storage/shared" + "github.com/matrix-org/dendrite/setup/config" ) func NewDatabase(dbProperties *config.DatabaseOptions) (*shared.Database, error) { diff --git a/keyserver/storage/storage.go b/keyserver/storage/storage.go index e1deaf93d..8f05d0030 100644 --- a/keyserver/storage/storage.go +++ b/keyserver/storage/storage.go @@ -19,9 +19,9 @@ package storage import ( "fmt" - "github.com/matrix-org/dendrite/internal/config" "github.com/matrix-org/dendrite/keyserver/storage/postgres" "github.com/matrix-org/dendrite/keyserver/storage/sqlite3" + "github.com/matrix-org/dendrite/setup/config" ) // NewDatabase opens a new Postgres or Sqlite database (based on dataSourceName scheme) diff --git a/keyserver/storage/storage_test.go b/keyserver/storage/storage_test.go index 358f11e75..afdb086de 100644 --- a/keyserver/storage/storage_test.go +++ b/keyserver/storage/storage_test.go @@ -10,8 +10,8 @@ import ( "testing" "github.com/Shopify/sarama" - "github.com/matrix-org/dendrite/internal/config" "github.com/matrix-org/dendrite/keyserver/api" + "github.com/matrix-org/dendrite/setup/config" ) var ctx = context.Background() diff --git a/keyserver/storage/storage_wasm.go b/keyserver/storage/storage_wasm.go index 792cd4a59..8b31bfd01 100644 --- a/keyserver/storage/storage_wasm.go +++ b/keyserver/storage/storage_wasm.go @@ -17,8 +17,8 @@ package storage import ( "fmt" - "github.com/matrix-org/dendrite/internal/config" "github.com/matrix-org/dendrite/keyserver/storage/sqlite3" + "github.com/matrix-org/dendrite/setup/config" ) func NewDatabase(dbProperties *config.DatabaseOptions) (Database, error) { diff --git a/mediaapi/fileutils/fileutils.go b/mediaapi/fileutils/fileutils.go index 92ce64001..df19eee4a 100644 --- a/mediaapi/fileutils/fileutils.go +++ b/mediaapi/fileutils/fileutils.go @@ -26,8 +26,8 @@ import ( "path/filepath" "strings" - "github.com/matrix-org/dendrite/internal/config" "github.com/matrix-org/dendrite/mediaapi/types" + "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/util" log "github.com/sirupsen/logrus" ) diff --git a/mediaapi/mediaapi.go b/mediaapi/mediaapi.go index 1c14559f5..811d8e4a4 100644 --- a/mediaapi/mediaapi.go +++ b/mediaapi/mediaapi.go @@ -16,9 +16,9 @@ package mediaapi import ( "github.com/gorilla/mux" - "github.com/matrix-org/dendrite/internal/config" "github.com/matrix-org/dendrite/mediaapi/routing" "github.com/matrix-org/dendrite/mediaapi/storage" + "github.com/matrix-org/dendrite/setup/config" userapi "github.com/matrix-org/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib" "github.com/sirupsen/logrus" diff --git a/mediaapi/routing/download.go b/mediaapi/routing/download.go index be0419048..8ea1b97f7 100644 --- a/mediaapi/routing/download.go +++ b/mediaapi/routing/download.go @@ -31,11 +31,11 @@ import ( "unicode" "github.com/matrix-org/dendrite/clientapi/jsonerror" - "github.com/matrix-org/dendrite/internal/config" "github.com/matrix-org/dendrite/mediaapi/fileutils" "github.com/matrix-org/dendrite/mediaapi/storage" "github.com/matrix-org/dendrite/mediaapi/thumbnailer" "github.com/matrix-org/dendrite/mediaapi/types" + "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/util" "github.com/pkg/errors" diff --git a/mediaapi/routing/routing.go b/mediaapi/routing/routing.go index 4b6d2fd75..917a85964 100644 --- a/mediaapi/routing/routing.go +++ b/mediaapi/routing/routing.go @@ -21,10 +21,10 @@ import ( userapi "github.com/matrix-org/dendrite/userapi/api" "github.com/gorilla/mux" - "github.com/matrix-org/dendrite/internal/config" "github.com/matrix-org/dendrite/internal/httputil" "github.com/matrix-org/dendrite/mediaapi/storage" "github.com/matrix-org/dendrite/mediaapi/types" + "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/util" "github.com/prometheus/client_golang/prometheus" diff --git a/mediaapi/routing/upload.go b/mediaapi/routing/upload.go index 1724ad255..1dcf4e17b 100644 --- a/mediaapi/routing/upload.go +++ b/mediaapi/routing/upload.go @@ -26,11 +26,11 @@ import ( "strings" "github.com/matrix-org/dendrite/clientapi/jsonerror" - "github.com/matrix-org/dendrite/internal/config" "github.com/matrix-org/dendrite/mediaapi/fileutils" "github.com/matrix-org/dendrite/mediaapi/storage" "github.com/matrix-org/dendrite/mediaapi/thumbnailer" "github.com/matrix-org/dendrite/mediaapi/types" + "github.com/matrix-org/dendrite/setup/config" userapi "github.com/matrix-org/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/util" diff --git a/mediaapi/storage/postgres/storage.go b/mediaapi/storage/postgres/storage.go index f89501de2..61ad468fe 100644 --- a/mediaapi/storage/postgres/storage.go +++ b/mediaapi/storage/postgres/storage.go @@ -21,9 +21,9 @@ import ( // Import the postgres database driver. _ "github.com/lib/pq" - "github.com/matrix-org/dendrite/internal/config" "github.com/matrix-org/dendrite/internal/sqlutil" "github.com/matrix-org/dendrite/mediaapi/types" + "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/gomatrixserverlib" ) diff --git a/mediaapi/storage/sqlite3/storage.go b/mediaapi/storage/sqlite3/storage.go index 9e510fa39..0edfc08e8 100644 --- a/mediaapi/storage/sqlite3/storage.go +++ b/mediaapi/storage/sqlite3/storage.go @@ -20,9 +20,9 @@ import ( "database/sql" // Import the postgres database driver. - "github.com/matrix-org/dendrite/internal/config" "github.com/matrix-org/dendrite/internal/sqlutil" "github.com/matrix-org/dendrite/mediaapi/types" + "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/gomatrixserverlib" _ "github.com/mattn/go-sqlite3" ) diff --git a/mediaapi/storage/storage.go b/mediaapi/storage/storage.go index 829d47b36..a976f795b 100644 --- a/mediaapi/storage/storage.go +++ b/mediaapi/storage/storage.go @@ -19,9 +19,9 @@ package storage import ( "fmt" - "github.com/matrix-org/dendrite/internal/config" "github.com/matrix-org/dendrite/mediaapi/storage/postgres" "github.com/matrix-org/dendrite/mediaapi/storage/sqlite3" + "github.com/matrix-org/dendrite/setup/config" ) // Open opens a postgres database. diff --git a/mediaapi/storage/storage_wasm.go b/mediaapi/storage/storage_wasm.go index 6b5de681b..a6e997b2a 100644 --- a/mediaapi/storage/storage_wasm.go +++ b/mediaapi/storage/storage_wasm.go @@ -17,8 +17,8 @@ package storage import ( "fmt" - "github.com/matrix-org/dendrite/internal/config" "github.com/matrix-org/dendrite/mediaapi/storage/sqlite3" + "github.com/matrix-org/dendrite/setup/config" ) // Open opens a postgres database. diff --git a/mediaapi/thumbnailer/thumbnailer.go b/mediaapi/thumbnailer/thumbnailer.go index 9a58b5bc1..58407ce8b 100644 --- a/mediaapi/thumbnailer/thumbnailer.go +++ b/mediaapi/thumbnailer/thumbnailer.go @@ -22,9 +22,9 @@ import ( "path/filepath" "sync" - "github.com/matrix-org/dendrite/internal/config" "github.com/matrix-org/dendrite/mediaapi/storage" "github.com/matrix-org/dendrite/mediaapi/types" + "github.com/matrix-org/dendrite/setup/config" log "github.com/sirupsen/logrus" ) diff --git a/mediaapi/thumbnailer/thumbnailer_bimg.go b/mediaapi/thumbnailer/thumbnailer_bimg.go index 915d576e3..087385a76 100644 --- a/mediaapi/thumbnailer/thumbnailer_bimg.go +++ b/mediaapi/thumbnailer/thumbnailer_bimg.go @@ -21,9 +21,9 @@ import ( "os" "time" - "github.com/matrix-org/dendrite/internal/config" "github.com/matrix-org/dendrite/mediaapi/storage" "github.com/matrix-org/dendrite/mediaapi/types" + "github.com/matrix-org/dendrite/setup/config" log "github.com/sirupsen/logrus" "gopkg.in/h2non/bimg.v1" ) diff --git a/mediaapi/thumbnailer/thumbnailer_nfnt.go b/mediaapi/thumbnailer/thumbnailer_nfnt.go index b48551e4e..aa9faf4c1 100644 --- a/mediaapi/thumbnailer/thumbnailer_nfnt.go +++ b/mediaapi/thumbnailer/thumbnailer_nfnt.go @@ -30,9 +30,9 @@ import ( "os" "time" - "github.com/matrix-org/dendrite/internal/config" "github.com/matrix-org/dendrite/mediaapi/storage" "github.com/matrix-org/dendrite/mediaapi/types" + "github.com/matrix-org/dendrite/setup/config" "github.com/nfnt/resize" log "github.com/sirupsen/logrus" ) diff --git a/mediaapi/types/types.go b/mediaapi/types/types.go index 9fa549509..0ba7010ad 100644 --- a/mediaapi/types/types.go +++ b/mediaapi/types/types.go @@ -17,7 +17,7 @@ package types import ( "sync" - "github.com/matrix-org/dendrite/internal/config" + "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/gomatrixserverlib" ) diff --git a/roomserver/internal/api.go b/roomserver/internal/api.go index 443cc6b38..c825c13d4 100644 --- a/roomserver/internal/api.go +++ b/roomserver/internal/api.go @@ -6,13 +6,13 @@ import ( "github.com/Shopify/sarama" fsAPI "github.com/matrix-org/dendrite/federationsender/api" "github.com/matrix-org/dendrite/internal/caching" - "github.com/matrix-org/dendrite/internal/config" "github.com/matrix-org/dendrite/roomserver/acls" "github.com/matrix-org/dendrite/roomserver/api" "github.com/matrix-org/dendrite/roomserver/internal/input" "github.com/matrix-org/dendrite/roomserver/internal/perform" "github.com/matrix-org/dendrite/roomserver/internal/query" "github.com/matrix-org/dendrite/roomserver/storage" + "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/gomatrixserverlib" ) diff --git a/roomserver/internal/perform/perform_invite.go b/roomserver/internal/perform/perform_invite.go index 0fb6ddd44..085cb02ed 100644 --- a/roomserver/internal/perform/perform_invite.go +++ b/roomserver/internal/perform/perform_invite.go @@ -19,13 +19,13 @@ import ( "fmt" federationSenderAPI "github.com/matrix-org/dendrite/federationsender/api" - "github.com/matrix-org/dendrite/internal/config" "github.com/matrix-org/dendrite/roomserver/api" "github.com/matrix-org/dendrite/roomserver/internal/helpers" "github.com/matrix-org/dendrite/roomserver/internal/input" "github.com/matrix-org/dendrite/roomserver/state" "github.com/matrix-org/dendrite/roomserver/storage" "github.com/matrix-org/dendrite/roomserver/types" + "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/gomatrixserverlib" log "github.com/sirupsen/logrus" ) diff --git a/roomserver/internal/perform/perform_join.go b/roomserver/internal/perform/perform_join.go index f3745a7ff..8eb6b648e 100644 --- a/roomserver/internal/perform/perform_join.go +++ b/roomserver/internal/perform/perform_join.go @@ -22,12 +22,12 @@ import ( "time" fsAPI "github.com/matrix-org/dendrite/federationsender/api" - "github.com/matrix-org/dendrite/internal/config" "github.com/matrix-org/dendrite/internal/eventutil" "github.com/matrix-org/dendrite/roomserver/api" "github.com/matrix-org/dendrite/roomserver/internal/helpers" "github.com/matrix-org/dendrite/roomserver/internal/input" "github.com/matrix-org/dendrite/roomserver/storage" + "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/gomatrixserverlib" "github.com/sirupsen/logrus" ) diff --git a/roomserver/internal/perform/perform_leave.go b/roomserver/internal/perform/perform_leave.go index 6aaf1bf3e..9d7c0816d 100644 --- a/roomserver/internal/perform/perform_leave.go +++ b/roomserver/internal/perform/perform_leave.go @@ -20,11 +20,11 @@ import ( "strings" fsAPI "github.com/matrix-org/dendrite/federationsender/api" - "github.com/matrix-org/dendrite/internal/config" "github.com/matrix-org/dendrite/roomserver/api" "github.com/matrix-org/dendrite/roomserver/internal/helpers" "github.com/matrix-org/dendrite/roomserver/internal/input" "github.com/matrix-org/dendrite/roomserver/storage" + "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/gomatrixserverlib" ) diff --git a/roomserver/internal/perform/perform_peek.go b/roomserver/internal/perform/perform_peek.go index ab6d17b03..66d1bdb21 100644 --- a/roomserver/internal/perform/perform_peek.go +++ b/roomserver/internal/perform/perform_peek.go @@ -21,10 +21,10 @@ import ( "strings" fsAPI "github.com/matrix-org/dendrite/federationsender/api" - "github.com/matrix-org/dendrite/internal/config" "github.com/matrix-org/dendrite/roomserver/api" "github.com/matrix-org/dendrite/roomserver/internal/input" "github.com/matrix-org/dendrite/roomserver/storage" + "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/util" "github.com/sirupsen/logrus" diff --git a/roomserver/roomserver.go b/roomserver/roomserver.go index b2cc0728c..396a1defa 100644 --- a/roomserver/roomserver.go +++ b/roomserver/roomserver.go @@ -20,11 +20,11 @@ import ( "github.com/matrix-org/dendrite/roomserver/inthttp" "github.com/matrix-org/gomatrixserverlib" - "github.com/matrix-org/dendrite/internal/config" - "github.com/matrix-org/dendrite/internal/setup" - "github.com/matrix-org/dendrite/internal/setup/kafka" "github.com/matrix-org/dendrite/roomserver/internal" "github.com/matrix-org/dendrite/roomserver/storage" + "github.com/matrix-org/dendrite/setup" + "github.com/matrix-org/dendrite/setup/config" + "github.com/matrix-org/dendrite/setup/kafka" "github.com/sirupsen/logrus" ) diff --git a/roomserver/roomserver_test.go b/roomserver/roomserver_test.go index 7638f3f3e..5c9540071 100644 --- a/roomserver/roomserver_test.go +++ b/roomserver/roomserver_test.go @@ -13,12 +13,12 @@ import ( "github.com/Shopify/sarama" "github.com/matrix-org/dendrite/internal/caching" - "github.com/matrix-org/dendrite/internal/config" - "github.com/matrix-org/dendrite/internal/setup" "github.com/matrix-org/dendrite/internal/test" "github.com/matrix-org/dendrite/roomserver/api" "github.com/matrix-org/dendrite/roomserver/internal" "github.com/matrix-org/dendrite/roomserver/storage" + "github.com/matrix-org/dendrite/setup" + "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/gomatrixserverlib" "github.com/sirupsen/logrus" ) diff --git a/roomserver/storage/postgres/storage.go b/roomserver/storage/postgres/storage.go index 37aca647c..bb3f841d0 100644 --- a/roomserver/storage/postgres/storage.go +++ b/roomserver/storage/postgres/storage.go @@ -22,10 +22,10 @@ import ( _ "github.com/lib/pq" "github.com/matrix-org/dendrite/internal/caching" - "github.com/matrix-org/dendrite/internal/config" "github.com/matrix-org/dendrite/internal/sqlutil" "github.com/matrix-org/dendrite/roomserver/storage/postgres/deltas" "github.com/matrix-org/dendrite/roomserver/storage/shared" + "github.com/matrix-org/dendrite/setup/config" ) // A Database is used to store room events and stream offsets. diff --git a/roomserver/storage/sqlite3/storage.go b/roomserver/storage/sqlite3/storage.go index b36930206..8e608a6db 100644 --- a/roomserver/storage/sqlite3/storage.go +++ b/roomserver/storage/sqlite3/storage.go @@ -22,11 +22,11 @@ import ( _ "github.com/mattn/go-sqlite3" "github.com/matrix-org/dendrite/internal/caching" - "github.com/matrix-org/dendrite/internal/config" "github.com/matrix-org/dendrite/internal/sqlutil" "github.com/matrix-org/dendrite/roomserver/storage/shared" "github.com/matrix-org/dendrite/roomserver/storage/sqlite3/deltas" "github.com/matrix-org/dendrite/roomserver/types" + "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/gomatrixserverlib" ) diff --git a/roomserver/storage/storage.go b/roomserver/storage/storage.go index cfbb7b554..9359312db 100644 --- a/roomserver/storage/storage.go +++ b/roomserver/storage/storage.go @@ -20,9 +20,9 @@ import ( "fmt" "github.com/matrix-org/dendrite/internal/caching" - "github.com/matrix-org/dendrite/internal/config" "github.com/matrix-org/dendrite/roomserver/storage/postgres" "github.com/matrix-org/dendrite/roomserver/storage/sqlite3" + "github.com/matrix-org/dendrite/setup/config" ) // Open opens a database connection. diff --git a/roomserver/storage/storage_wasm.go b/roomserver/storage/storage_wasm.go index 28e285461..dfc374e6e 100644 --- a/roomserver/storage/storage_wasm.go +++ b/roomserver/storage/storage_wasm.go @@ -18,8 +18,8 @@ import ( "fmt" "github.com/matrix-org/dendrite/internal/caching" - "github.com/matrix-org/dendrite/internal/config" "github.com/matrix-org/dendrite/roomserver/storage/sqlite3" + "github.com/matrix-org/dendrite/setup/config" ) // NewPublicRoomsServerDatabase opens a database connection. diff --git a/internal/setup/base.go b/setup/base.go similarity index 99% rename from internal/setup/base.go rename to setup/base.go index 1820778ad..acbf2d35f 100644 --- a/internal/setup/base.go +++ b/setup/base.go @@ -41,11 +41,11 @@ import ( eduinthttp "github.com/matrix-org/dendrite/eduserver/inthttp" federationSenderAPI "github.com/matrix-org/dendrite/federationsender/api" fsinthttp "github.com/matrix-org/dendrite/federationsender/inthttp" - "github.com/matrix-org/dendrite/internal/config" keyserverAPI "github.com/matrix-org/dendrite/keyserver/api" keyinthttp "github.com/matrix-org/dendrite/keyserver/inthttp" roomserverAPI "github.com/matrix-org/dendrite/roomserver/api" rsinthttp "github.com/matrix-org/dendrite/roomserver/inthttp" + "github.com/matrix-org/dendrite/setup/config" skapi "github.com/matrix-org/dendrite/signingkeyserver/api" skinthttp "github.com/matrix-org/dendrite/signingkeyserver/inthttp" userapi "github.com/matrix-org/dendrite/userapi/api" diff --git a/internal/config/config.go b/setup/config/config.go similarity index 100% rename from internal/config/config.go rename to setup/config/config.go diff --git a/internal/config/config_appservice.go b/setup/config/config_appservice.go similarity index 100% rename from internal/config/config_appservice.go rename to setup/config/config_appservice.go diff --git a/internal/config/config_clientapi.go b/setup/config/config_clientapi.go similarity index 100% rename from internal/config/config_clientapi.go rename to setup/config/config_clientapi.go diff --git a/internal/config/config_eduserver.go b/setup/config/config_eduserver.go similarity index 100% rename from internal/config/config_eduserver.go rename to setup/config/config_eduserver.go diff --git a/internal/config/config_federationapi.go b/setup/config/config_federationapi.go similarity index 100% rename from internal/config/config_federationapi.go rename to setup/config/config_federationapi.go diff --git a/internal/config/config_federationsender.go b/setup/config/config_federationsender.go similarity index 100% rename from internal/config/config_federationsender.go rename to setup/config/config_federationsender.go diff --git a/internal/config/config_global.go b/setup/config/config_global.go similarity index 100% rename from internal/config/config_global.go rename to setup/config/config_global.go diff --git a/internal/config/config_kafka.go b/setup/config/config_kafka.go similarity index 100% rename from internal/config/config_kafka.go rename to setup/config/config_kafka.go diff --git a/internal/config/config_keyserver.go b/setup/config/config_keyserver.go similarity index 100% rename from internal/config/config_keyserver.go rename to setup/config/config_keyserver.go diff --git a/internal/config/config_mediaapi.go b/setup/config/config_mediaapi.go similarity index 100% rename from internal/config/config_mediaapi.go rename to setup/config/config_mediaapi.go diff --git a/internal/config/config_mscs.go b/setup/config/config_mscs.go similarity index 100% rename from internal/config/config_mscs.go rename to setup/config/config_mscs.go diff --git a/internal/config/config_roomserver.go b/setup/config/config_roomserver.go similarity index 100% rename from internal/config/config_roomserver.go rename to setup/config/config_roomserver.go diff --git a/internal/config/config_signingkeyserver.go b/setup/config/config_signingkeyserver.go similarity index 100% rename from internal/config/config_signingkeyserver.go rename to setup/config/config_signingkeyserver.go diff --git a/internal/config/config_syncapi.go b/setup/config/config_syncapi.go similarity index 100% rename from internal/config/config_syncapi.go rename to setup/config/config_syncapi.go diff --git a/internal/config/config_test.go b/setup/config/config_test.go similarity index 100% rename from internal/config/config_test.go rename to setup/config/config_test.go diff --git a/internal/config/config_userapi.go b/setup/config/config_userapi.go similarity index 100% rename from internal/config/config_userapi.go rename to setup/config/config_userapi.go diff --git a/internal/setup/federation.go b/setup/federation.go similarity index 100% rename from internal/setup/federation.go rename to setup/federation.go diff --git a/internal/setup/flags.go b/setup/flags.go similarity index 96% rename from internal/setup/flags.go rename to setup/flags.go index c6ecb5cd1..281cf3392 100644 --- a/internal/setup/flags.go +++ b/setup/flags.go @@ -20,7 +20,7 @@ import ( "os" "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/config" + "github.com/matrix-org/dendrite/setup/config" "github.com/sirupsen/logrus" ) diff --git a/internal/setup/kafka/kafka.go b/setup/kafka/kafka.go similarity index 97% rename from internal/setup/kafka/kafka.go rename to setup/kafka/kafka.go index 091025ec7..a2902c962 100644 --- a/internal/setup/kafka/kafka.go +++ b/setup/kafka/kafka.go @@ -2,7 +2,7 @@ package kafka import ( "github.com/Shopify/sarama" - "github.com/matrix-org/dendrite/internal/config" + "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/naffka" naffkaStorage "github.com/matrix-org/naffka/storage" "github.com/sirupsen/logrus" diff --git a/internal/setup/monolith.go b/setup/monolith.go similarity index 98% rename from internal/setup/monolith.go rename to setup/monolith.go index 9d3625d2f..2403f57fa 100644 --- a/internal/setup/monolith.go +++ b/setup/monolith.go @@ -22,11 +22,11 @@ import ( eduServerAPI "github.com/matrix-org/dendrite/eduserver/api" "github.com/matrix-org/dendrite/federationapi" federationSenderAPI "github.com/matrix-org/dendrite/federationsender/api" - "github.com/matrix-org/dendrite/internal/config" "github.com/matrix-org/dendrite/internal/transactions" keyAPI "github.com/matrix-org/dendrite/keyserver/api" "github.com/matrix-org/dendrite/mediaapi" roomserverAPI "github.com/matrix-org/dendrite/roomserver/api" + "github.com/matrix-org/dendrite/setup/config" serverKeyAPI "github.com/matrix-org/dendrite/signingkeyserver/api" "github.com/matrix-org/dendrite/syncapi" userapi "github.com/matrix-org/dendrite/userapi/api" diff --git a/internal/mscs/msc2836/msc2836.go b/setup/mscs/msc2836/msc2836.go similarity index 99% rename from internal/mscs/msc2836/msc2836.go rename to setup/mscs/msc2836/msc2836.go index 865bc3111..33a65c8f4 100644 --- a/internal/mscs/msc2836/msc2836.go +++ b/setup/mscs/msc2836/msc2836.go @@ -28,8 +28,8 @@ import ( fs "github.com/matrix-org/dendrite/federationsender/api" "github.com/matrix-org/dendrite/internal/hooks" "github.com/matrix-org/dendrite/internal/httputil" - "github.com/matrix-org/dendrite/internal/setup" roomserver "github.com/matrix-org/dendrite/roomserver/api" + "github.com/matrix-org/dendrite/setup" userapi "github.com/matrix-org/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/util" diff --git a/internal/mscs/msc2836/msc2836_test.go b/setup/mscs/msc2836/msc2836_test.go similarity index 99% rename from internal/mscs/msc2836/msc2836_test.go rename to setup/mscs/msc2836/msc2836_test.go index 265d6ee67..996cc79f0 100644 --- a/internal/mscs/msc2836/msc2836_test.go +++ b/setup/mscs/msc2836/msc2836_test.go @@ -12,12 +12,12 @@ import ( "time" "github.com/gorilla/mux" - "github.com/matrix-org/dendrite/internal/config" "github.com/matrix-org/dendrite/internal/hooks" "github.com/matrix-org/dendrite/internal/httputil" - "github.com/matrix-org/dendrite/internal/mscs/msc2836" - "github.com/matrix-org/dendrite/internal/setup" roomserver "github.com/matrix-org/dendrite/roomserver/api" + "github.com/matrix-org/dendrite/setup" + "github.com/matrix-org/dendrite/setup/config" + "github.com/matrix-org/dendrite/setup/mscs/msc2836" userapi "github.com/matrix-org/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib" ) diff --git a/internal/mscs/msc2836/storage.go b/setup/mscs/msc2836/storage.go similarity index 99% rename from internal/mscs/msc2836/storage.go rename to setup/mscs/msc2836/storage.go index f524165fa..72ea5195b 100644 --- a/internal/mscs/msc2836/storage.go +++ b/setup/mscs/msc2836/storage.go @@ -5,8 +5,8 @@ import ( "database/sql" "encoding/json" - "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/gomatrixserverlib" ) diff --git a/internal/mscs/mscs.go b/setup/mscs/mscs.go similarity index 92% rename from internal/mscs/mscs.go rename to setup/mscs/mscs.go index 0a896ab0f..8b0498ced 100644 --- a/internal/mscs/mscs.go +++ b/setup/mscs/mscs.go @@ -18,8 +18,8 @@ package mscs import ( "fmt" - "github.com/matrix-org/dendrite/internal/mscs/msc2836" - "github.com/matrix-org/dendrite/internal/setup" + "github.com/matrix-org/dendrite/setup" + "github.com/matrix-org/dendrite/setup/mscs/msc2836" ) // Enable MSCs - returns an error on unknown MSCs diff --git a/signingkeyserver/internal/api.go b/signingkeyserver/internal/api.go index 4a1dd29e7..f9a04a74f 100644 --- a/signingkeyserver/internal/api.go +++ b/signingkeyserver/internal/api.go @@ -6,7 +6,7 @@ import ( "fmt" "time" - "github.com/matrix-org/dendrite/internal/config" + "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/dendrite/signingkeyserver/api" "github.com/matrix-org/gomatrixserverlib" "github.com/sirupsen/logrus" diff --git a/signingkeyserver/serverkeyapi_test.go b/signingkeyserver/serverkeyapi_test.go index e5578f43c..e59deb4d7 100644 --- a/signingkeyserver/serverkeyapi_test.go +++ b/signingkeyserver/serverkeyapi_test.go @@ -15,7 +15,7 @@ import ( "github.com/matrix-org/dendrite/federationapi/routing" "github.com/matrix-org/dendrite/internal/caching" - "github.com/matrix-org/dendrite/internal/config" + "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/dendrite/signingkeyserver/api" "github.com/matrix-org/gomatrixserverlib" ) diff --git a/signingkeyserver/signingkeyserver.go b/signingkeyserver/signingkeyserver.go index 27b4c7035..2b1d6751f 100644 --- a/signingkeyserver/signingkeyserver.go +++ b/signingkeyserver/signingkeyserver.go @@ -6,7 +6,7 @@ import ( "github.com/gorilla/mux" "github.com/matrix-org/dendrite/internal/caching" - "github.com/matrix-org/dendrite/internal/config" + "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/dendrite/signingkeyserver/api" "github.com/matrix-org/dendrite/signingkeyserver/internal" "github.com/matrix-org/dendrite/signingkeyserver/inthttp" diff --git a/signingkeyserver/storage/keydb.go b/signingkeyserver/storage/keydb.go index ef1077fc9..aa247f1d8 100644 --- a/signingkeyserver/storage/keydb.go +++ b/signingkeyserver/storage/keydb.go @@ -21,7 +21,7 @@ import ( "golang.org/x/crypto/ed25519" - "github.com/matrix-org/dendrite/internal/config" + "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/dendrite/signingkeyserver/storage/postgres" "github.com/matrix-org/dendrite/signingkeyserver/storage/sqlite3" "github.com/matrix-org/gomatrixserverlib" diff --git a/signingkeyserver/storage/postgres/keydb.go b/signingkeyserver/storage/postgres/keydb.go index 634440859..1b3032de5 100644 --- a/signingkeyserver/storage/postgres/keydb.go +++ b/signingkeyserver/storage/postgres/keydb.go @@ -20,8 +20,8 @@ import ( "golang.org/x/crypto/ed25519" - "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/gomatrixserverlib" ) diff --git a/signingkeyserver/storage/sqlite3/keydb.go b/signingkeyserver/storage/sqlite3/keydb.go index 0ee74bc10..8825d6973 100644 --- a/signingkeyserver/storage/sqlite3/keydb.go +++ b/signingkeyserver/storage/sqlite3/keydb.go @@ -20,8 +20,8 @@ import ( "golang.org/x/crypto/ed25519" - "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/gomatrixserverlib" _ "github.com/mattn/go-sqlite3" diff --git a/syncapi/consumers/clientapi.go b/syncapi/consumers/clientapi.go index d03dd2c46..7070dd320 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 c5d17414a..3361e1347 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 f880f3f20..07324fcd7 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 80d1d000b..bdea606cb 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 05f32a83a..4d453f133 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 c25011814..adf498d2d 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 81a7857fc..92f36e23b 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 141eec799..20152b48f 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 979e19a0b..a77c0ec08 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 036e2b2e5..7df71b384 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 c16dcd810..15386c338 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 3930ab6b5..b1b0d2543 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 43b7bbead..f7fef962b 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 cb84c5bb6..0cb6efe7a 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 7e277ba19..0610add53 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 34c73dc29..62404a606 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, }, diff --git a/userapi/internal/api.go b/userapi/internal/api.go index 3b5f4978a..c1b9bcabf 100644 --- a/userapi/internal/api.go +++ b/userapi/internal/api.go @@ -23,9 +23,9 @@ import ( "github.com/matrix-org/dendrite/appservice/types" "github.com/matrix-org/dendrite/clientapi/userutil" - "github.com/matrix-org/dendrite/internal/config" "github.com/matrix-org/dendrite/internal/sqlutil" keyapi "github.com/matrix-org/dendrite/keyserver/api" + "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/dendrite/userapi/api" "github.com/matrix-org/dendrite/userapi/storage/accounts" "github.com/matrix-org/dendrite/userapi/storage/devices" diff --git a/userapi/storage/accounts/postgres/storage.go b/userapi/storage/accounts/postgres/storage.go index 40c4b8ff5..870756d8b 100644 --- a/userapi/storage/accounts/postgres/storage.go +++ b/userapi/storage/accounts/postgres/storage.go @@ -22,8 +22,8 @@ import ( "strconv" "github.com/matrix-org/dendrite/clientapi/auth/authtypes" - "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/userapi/api" "github.com/matrix-org/dendrite/userapi/storage/accounts/postgres/deltas" _ "github.com/matrix-org/dendrite/userapi/storage/accounts/postgres/deltas" diff --git a/userapi/storage/accounts/sqlite3/storage.go b/userapi/storage/accounts/sqlite3/storage.go index 0be7bcbe7..2b621c4ca 100644 --- a/userapi/storage/accounts/sqlite3/storage.go +++ b/userapi/storage/accounts/sqlite3/storage.go @@ -23,8 +23,8 @@ import ( "sync" "github.com/matrix-org/dendrite/clientapi/auth/authtypes" - "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/userapi/api" "github.com/matrix-org/dendrite/userapi/storage/accounts/sqlite3/deltas" "github.com/matrix-org/gomatrixserverlib" diff --git a/userapi/storage/accounts/storage.go b/userapi/storage/accounts/storage.go index 57d5f7039..3f69e95f6 100644 --- a/userapi/storage/accounts/storage.go +++ b/userapi/storage/accounts/storage.go @@ -19,7 +19,7 @@ package accounts import ( "fmt" - "github.com/matrix-org/dendrite/internal/config" + "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/dendrite/userapi/storage/accounts/postgres" "github.com/matrix-org/dendrite/userapi/storage/accounts/sqlite3" "github.com/matrix-org/gomatrixserverlib" diff --git a/userapi/storage/accounts/storage_wasm.go b/userapi/storage/accounts/storage_wasm.go index ade32b68f..dcaf371a1 100644 --- a/userapi/storage/accounts/storage_wasm.go +++ b/userapi/storage/accounts/storage_wasm.go @@ -17,7 +17,7 @@ package accounts import ( "fmt" - "github.com/matrix-org/dendrite/internal/config" + "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/dendrite/userapi/storage/accounts/sqlite3" "github.com/matrix-org/gomatrixserverlib" ) diff --git a/userapi/storage/devices/postgres/storage.go b/userapi/storage/devices/postgres/storage.go index 6dd18b092..485234331 100644 --- a/userapi/storage/devices/postgres/storage.go +++ b/userapi/storage/devices/postgres/storage.go @@ -20,8 +20,8 @@ import ( "database/sql" "encoding/base64" - "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/userapi/api" "github.com/matrix-org/dendrite/userapi/storage/devices/postgres/deltas" "github.com/matrix-org/gomatrixserverlib" diff --git a/userapi/storage/devices/sqlite3/storage.go b/userapi/storage/devices/sqlite3/storage.go index 2eefb3f34..8afa9fb46 100644 --- a/userapi/storage/devices/sqlite3/storage.go +++ b/userapi/storage/devices/sqlite3/storage.go @@ -20,8 +20,8 @@ import ( "database/sql" "encoding/base64" - "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/userapi/api" "github.com/matrix-org/dendrite/userapi/storage/devices/sqlite3/deltas" "github.com/matrix-org/gomatrixserverlib" diff --git a/userapi/storage/devices/storage.go b/userapi/storage/devices/storage.go index 1bd73a9fb..bfce924d9 100644 --- a/userapi/storage/devices/storage.go +++ b/userapi/storage/devices/storage.go @@ -19,7 +19,7 @@ package devices import ( "fmt" - "github.com/matrix-org/dendrite/internal/config" + "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/dendrite/userapi/storage/devices/postgres" "github.com/matrix-org/dendrite/userapi/storage/devices/sqlite3" "github.com/matrix-org/gomatrixserverlib" diff --git a/userapi/storage/devices/storage_wasm.go b/userapi/storage/devices/storage_wasm.go index e966c37f3..f360f9857 100644 --- a/userapi/storage/devices/storage_wasm.go +++ b/userapi/storage/devices/storage_wasm.go @@ -17,7 +17,7 @@ package devices import ( "fmt" - "github.com/matrix-org/dendrite/internal/config" + "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/dendrite/userapi/storage/devices/sqlite3" "github.com/matrix-org/gomatrixserverlib" ) diff --git a/userapi/userapi.go b/userapi/userapi.go index 132491429..b8b826bc8 100644 --- a/userapi/userapi.go +++ b/userapi/userapi.go @@ -16,8 +16,8 @@ package userapi import ( "github.com/gorilla/mux" - "github.com/matrix-org/dendrite/internal/config" keyapi "github.com/matrix-org/dendrite/keyserver/api" + "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/dendrite/userapi/api" "github.com/matrix-org/dendrite/userapi/internal" "github.com/matrix-org/dendrite/userapi/inthttp" diff --git a/userapi/userapi_test.go b/userapi/userapi_test.go index 3fc97d06a..25c262ad1 100644 --- a/userapi/userapi_test.go +++ b/userapi/userapi_test.go @@ -8,9 +8,9 @@ import ( "testing" "github.com/gorilla/mux" - "github.com/matrix-org/dendrite/internal/config" "github.com/matrix-org/dendrite/internal/httputil" "github.com/matrix-org/dendrite/internal/test" + "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/dendrite/userapi" "github.com/matrix-org/dendrite/userapi/api" "github.com/matrix-org/dendrite/userapi/inthttp"