Common -> internal

This commit is contained in:
Neil Alexander 2020-05-21 15:11:50 +01:00
parent f19109a45c
commit 8121ff929b
9 changed files with 9 additions and 25 deletions

View file

@ -15,7 +15,7 @@
package main package main
import ( import (
"github.com/matrix-org/dendrite/common/basecomponent" "github.com/matrix-org/dendrite/internal/basecomponent"
"github.com/matrix-org/dendrite/serverkeyapi" "github.com/matrix-org/dendrite/serverkeyapi"
) )

View file

@ -4,12 +4,7 @@ import (
"context" "context"
"errors" "errors"
<<<<<<< HEAD:serverkeyapi/storage/cache/keydb.go
"github.com/matrix-org/dendrite/common/caching"
=======
"github.com/matrix-org/dendrite/internal/caching" "github.com/matrix-org/dendrite/internal/caching"
"github.com/matrix-org/dendrite/internal/keydb"
>>>>>>> master:internal/keydb/cache/keydb.go
"github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib"
) )

View file

@ -21,15 +21,9 @@ import (
"golang.org/x/crypto/ed25519" "golang.org/x/crypto/ed25519"
<<<<<<< HEAD:serverkeyapi/storage/keydb.go
"github.com/matrix-org/dendrite/common"
"github.com/matrix-org/dendrite/serverkeyapi/storage/postgres"
"github.com/matrix-org/dendrite/serverkeyapi/storage/sqlite3"
=======
"github.com/matrix-org/dendrite/internal" "github.com/matrix-org/dendrite/internal"
"github.com/matrix-org/dendrite/internal/keydb/postgres" "github.com/matrix-org/dendrite/internal/keydb/postgres"
"github.com/matrix-org/dendrite/internal/keydb/sqlite3" "github.com/matrix-org/dendrite/internal/keydb/sqlite3"
>>>>>>> master:internal/keydb/keydb.go
"github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib"
) )

View file

@ -22,13 +22,8 @@ import (
"golang.org/x/crypto/ed25519" "golang.org/x/crypto/ed25519"
<<<<<<< HEAD:serverkeyapi/storage/keydb_wasm.go
"github.com/matrix-org/dendrite/common"
"github.com/matrix-org/dendrite/serverkeyapi/storage/sqlite3"
=======
"github.com/matrix-org/dendrite/internal" "github.com/matrix-org/dendrite/internal"
"github.com/matrix-org/dendrite/internal/keydb/sqlite3" "github.com/matrix-org/dendrite/internal/keydb/sqlite3"
>>>>>>> master:internal/keydb/keydb_wasm.go
"github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib"
) )

View file

@ -5,7 +5,7 @@ import (
"errors" "errors"
"net/http" "net/http"
"github.com/matrix-org/dendrite/common/caching" "github.com/matrix-org/dendrite/internal/caching"
"github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib"
) )

View file

@ -3,7 +3,7 @@ package api
import ( import (
"context" "context"
commonHTTP "github.com/matrix-org/dendrite/common/http" commonHTTP "github.com/matrix-org/dendrite/internal/http"
"github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib"
"github.com/opentracing/opentracing-go" "github.com/opentracing/opentracing-go"

View file

@ -3,8 +3,8 @@ package internal
import ( import (
"context" "context"
"github.com/matrix-org/dendrite/common/caching" "github.com/matrix-org/dendrite/internal/caching"
"github.com/matrix-org/dendrite/common/config" "github.com/matrix-org/dendrite/internal/config"
"github.com/matrix-org/dendrite/serverkeyapi/api" "github.com/matrix-org/dendrite/serverkeyapi/api"
"github.com/matrix-org/dendrite/serverkeyapi/storage" "github.com/matrix-org/dendrite/serverkeyapi/storage"
"github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib"

View file

@ -4,7 +4,7 @@ import (
"encoding/json" "encoding/json"
"net/http" "net/http"
"github.com/matrix-org/dendrite/common" "github.com/matrix-org/dendrite/internal"
"github.com/matrix-org/dendrite/serverkeyapi/api" "github.com/matrix-org/dendrite/serverkeyapi/api"
"github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib"
"github.com/matrix-org/util" "github.com/matrix-org/util"
@ -12,7 +12,7 @@ import (
func (s *ServerKeyAPI) SetupHTTP(servMux *http.ServeMux) { func (s *ServerKeyAPI) SetupHTTP(servMux *http.ServeMux) {
servMux.Handle(api.ServerKeyQueryPublicKeyPath, servMux.Handle(api.ServerKeyQueryPublicKeyPath,
common.MakeInternalAPI("queryPublicKeys", func(req *http.Request) util.JSONResponse { internal.MakeInternalAPI("queryPublicKeys", func(req *http.Request) util.JSONResponse {
result := map[gomatrixserverlib.PublicKeyLookupRequest]gomatrixserverlib.PublicKeyLookupResult{} result := map[gomatrixserverlib.PublicKeyLookupRequest]gomatrixserverlib.PublicKeyLookupResult{}
request := api.QueryPublicKeysRequest{} request := api.QueryPublicKeysRequest{}
response := api.QueryPublicKeysResponse{} response := api.QueryPublicKeysResponse{}
@ -39,7 +39,7 @@ func (s *ServerKeyAPI) SetupHTTP(servMux *http.ServeMux) {
}), }),
) )
servMux.Handle(api.ServerKeyInputPublicKeyPath, servMux.Handle(api.ServerKeyInputPublicKeyPath,
common.MakeInternalAPI("inputPublicKeys", func(req *http.Request) util.JSONResponse { internal.MakeInternalAPI("inputPublicKeys", func(req *http.Request) util.JSONResponse {
request := api.InputPublicKeysRequest{} request := api.InputPublicKeysRequest{}
response := api.InputPublicKeysResponse{} response := api.InputPublicKeysResponse{}
if err := json.NewDecoder(req.Body).Decode(&request); err != nil { if err := json.NewDecoder(req.Body).Decode(&request); err != nil {

View file

@ -4,7 +4,7 @@ import (
"crypto/ed25519" "crypto/ed25519"
"encoding/base64" "encoding/base64"
"github.com/matrix-org/dendrite/common/basecomponent" "github.com/matrix-org/dendrite/internal/basecomponent"
"github.com/matrix-org/dendrite/serverkeyapi/internal" "github.com/matrix-org/dendrite/serverkeyapi/internal"
"github.com/matrix-org/dendrite/serverkeyapi/storage" "github.com/matrix-org/dendrite/serverkeyapi/storage"
"github.com/matrix-org/dendrite/serverkeyapi/storage/cache" "github.com/matrix-org/dendrite/serverkeyapi/storage/cache"