Rename package -> github.com/matrix-org/sliding-sync

This commit is contained in:
Kegan Dougal 2022-12-15 11:08:50 +00:00
parent beeb128be0
commit aa28df161c
79 changed files with 183 additions and 183 deletions

View File

@ -7,8 +7,8 @@ import (
"os" "os"
"strings" "strings"
syncv3 "github.com/matrix-org/sync-v3" syncv3 "github.com/matrix-org/sliding-sync"
"github.com/matrix-org/sync-v3/sync2" "github.com/matrix-org/sliding-sync/sync2"
"github.com/prometheus/client_golang/prometheus/promhttp" "github.com/prometheus/client_golang/prometheus/promhttp"
) )

2
go.mod
View File

@ -1,4 +1,4 @@
module github.com/matrix-org/sync-v3 module github.com/matrix-org/sliding-sync
go 1.14 go 1.14

View File

@ -3,7 +3,7 @@ package pubsub
import ( import (
"encoding/json" "encoding/json"
"github.com/matrix-org/sync-v3/internal" "github.com/matrix-org/sliding-sync/internal"
) )
// The channel which has V2* payloads // The channel which has V2* payloads

View File

@ -5,7 +5,7 @@ import (
"github.com/jmoiron/sqlx" "github.com/jmoiron/sqlx"
"github.com/lib/pq" "github.com/lib/pq"
"github.com/matrix-org/sync-v3/sqlutil" "github.com/matrix-org/sliding-sync/sqlutil"
) )
const AccountDataGlobalRoom = "" const AccountDataGlobalRoom = ""

View File

@ -6,7 +6,7 @@ import (
"testing" "testing"
"github.com/jmoiron/sqlx" "github.com/jmoiron/sqlx"
"github.com/matrix-org/sync-v3/sync2" "github.com/matrix-org/sliding-sync/sync2"
) )
func accountDatasEqual(gots, wants []AccountData) bool { func accountDatasEqual(gots, wants []AccountData) bool {

View File

@ -8,7 +8,7 @@ import (
"github.com/jmoiron/sqlx" "github.com/jmoiron/sqlx"
"github.com/lib/pq" "github.com/lib/pq"
"github.com/matrix-org/sync-v3/sqlutil" "github.com/matrix-org/sliding-sync/sqlutil"
"github.com/rs/zerolog" "github.com/rs/zerolog"
"github.com/tidwall/gjson" "github.com/tidwall/gjson"
) )

View File

@ -8,8 +8,8 @@ import (
"testing" "testing"
"github.com/jmoiron/sqlx" "github.com/jmoiron/sqlx"
"github.com/matrix-org/sync-v3/sync2" "github.com/matrix-org/sliding-sync/sync2"
"github.com/matrix-org/sync-v3/testutils" "github.com/matrix-org/sliding-sync/testutils"
"github.com/tidwall/gjson" "github.com/tidwall/gjson"
) )

View File

@ -5,8 +5,8 @@ import (
"encoding/json" "encoding/json"
"github.com/jmoiron/sqlx" "github.com/jmoiron/sqlx"
"github.com/matrix-org/sync-v3/internal" "github.com/matrix-org/sliding-sync/internal"
"github.com/matrix-org/sync-v3/sqlutil" "github.com/matrix-org/sliding-sync/sqlutil"
) )
type DeviceDataRow struct { type DeviceDataRow struct {

View File

@ -5,7 +5,7 @@ import (
"testing" "testing"
"github.com/jmoiron/sqlx" "github.com/jmoiron/sqlx"
"github.com/matrix-org/sync-v3/internal" "github.com/matrix-org/sliding-sync/internal"
) )
func assertVal(t *testing.T, msg string, got, want interface{}) { func assertVal(t *testing.T, msg string, got, want interface{}) {

View File

@ -10,8 +10,8 @@ import (
"github.com/tidwall/gjson" "github.com/tidwall/gjson"
"github.com/tidwall/sjson" "github.com/tidwall/sjson"
"github.com/matrix-org/sync-v3/internal" "github.com/matrix-org/sliding-sync/internal"
"github.com/matrix-org/sync-v3/sqlutil" "github.com/matrix-org/sliding-sync/sqlutil"
) )
const ( const (

View File

@ -9,8 +9,8 @@ import (
"github.com/jmoiron/sqlx" "github.com/jmoiron/sqlx"
"github.com/tidwall/gjson" "github.com/tidwall/gjson"
"github.com/matrix-org/sync-v3/sqlutil" "github.com/matrix-org/sliding-sync/sqlutil"
"github.com/matrix-org/sync-v3/testutils" "github.com/matrix-org/sliding-sync/testutils"
) )
func TestEventTable(t *testing.T) { func TestEventTable(t *testing.T) {

View File

@ -4,7 +4,7 @@ import (
"os" "os"
"testing" "testing"
"github.com/matrix-org/sync-v3/testutils" "github.com/matrix-org/sliding-sync/testutils"
) )
var postgresConnectionString = "user=xxxxx dbname=syncv3_test sslmode=disable" var postgresConnectionString = "user=xxxxx dbname=syncv3_test sslmode=disable"

View File

@ -6,8 +6,8 @@ import (
"github.com/jmoiron/sqlx" "github.com/jmoiron/sqlx"
"github.com/lib/pq" "github.com/lib/pq"
"github.com/matrix-org/sync-v3/internal" "github.com/matrix-org/sliding-sync/internal"
"github.com/matrix-org/sync-v3/sqlutil" "github.com/matrix-org/sliding-sync/sqlutil"
) )
type receiptEDU struct { type receiptEDU struct {

View File

@ -7,7 +7,7 @@ import (
"testing" "testing"
"github.com/jmoiron/sqlx" "github.com/jmoiron/sqlx"
"github.com/matrix-org/sync-v3/internal" "github.com/matrix-org/sliding-sync/internal"
) )
func sortReceipts(receipts []internal.Receipt) { func sortReceipts(receipts []internal.Receipt) {

View File

@ -5,7 +5,7 @@ import (
"github.com/jmoiron/sqlx" "github.com/jmoiron/sqlx"
"github.com/lib/pq" "github.com/lib/pq"
"github.com/matrix-org/sync-v3/sqlutil" "github.com/matrix-org/sliding-sync/sqlutil"
"github.com/tidwall/gjson" "github.com/tidwall/gjson"
) )

View File

@ -11,8 +11,8 @@ import (
"github.com/jmoiron/sqlx" "github.com/jmoiron/sqlx"
"github.com/lib/pq" "github.com/lib/pq"
"github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib"
"github.com/matrix-org/sync-v3/internal" "github.com/matrix-org/sliding-sync/internal"
"github.com/matrix-org/sync-v3/sqlutil" "github.com/matrix-org/sliding-sync/sqlutil"
"github.com/rs/zerolog" "github.com/rs/zerolog"
"github.com/tidwall/gjson" "github.com/tidwall/gjson"
) )

View File

@ -10,9 +10,9 @@ import (
"github.com/jmoiron/sqlx" "github.com/jmoiron/sqlx"
"github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib"
"github.com/matrix-org/sync-v3/internal" "github.com/matrix-org/sliding-sync/internal"
"github.com/matrix-org/sync-v3/sqlutil" "github.com/matrix-org/sliding-sync/sqlutil"
"github.com/matrix-org/sync-v3/testutils" "github.com/matrix-org/sliding-sync/testutils"
"github.com/tidwall/gjson" "github.com/tidwall/gjson"
) )

View File

@ -7,7 +7,7 @@ import (
"github.com/jmoiron/sqlx" "github.com/jmoiron/sqlx"
"github.com/lib/pq" "github.com/lib/pq"
"github.com/matrix-org/sync-v3/sqlutil" "github.com/matrix-org/sliding-sync/sqlutil"
"github.com/tidwall/gjson" "github.com/tidwall/gjson"
) )

View File

@ -5,10 +5,10 @@ import (
"os" "os"
"sync" "sync"
"github.com/matrix-org/sync-v3/internal" "github.com/matrix-org/sliding-sync/internal"
"github.com/matrix-org/sync-v3/pubsub" "github.com/matrix-org/sliding-sync/pubsub"
"github.com/matrix-org/sync-v3/state" "github.com/matrix-org/sliding-sync/state"
"github.com/matrix-org/sync-v3/sync2" "github.com/matrix-org/sliding-sync/sync2"
"github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus"
"github.com/rs/zerolog" "github.com/rs/zerolog"
"github.com/tidwall/gjson" "github.com/tidwall/gjson"

View File

@ -6,7 +6,7 @@ import (
"sync" "sync"
"time" "time"
"github.com/matrix-org/sync-v3/internal" "github.com/matrix-org/sliding-sync/internal"
"github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus"
"github.com/rs/zerolog" "github.com/rs/zerolog"
"github.com/tidwall/gjson" "github.com/tidwall/gjson"

View File

@ -13,7 +13,7 @@ import (
"github.com/jmoiron/sqlx" "github.com/jmoiron/sqlx"
_ "github.com/lib/pq" _ "github.com/lib/pq"
"github.com/matrix-org/sync-v3/sqlutil" "github.com/matrix-org/sliding-sync/sqlutil"
"github.com/rs/zerolog" "github.com/rs/zerolog"
) )

View File

@ -5,7 +5,7 @@ import (
"sort" "sort"
"testing" "testing"
"github.com/matrix-org/sync-v3/testutils" "github.com/matrix-org/sliding-sync/testutils"
) )
var postgresConnectionString = "user=xxxxx dbname=syncv3_test sslmode=disable" var postgresConnectionString = "user=xxxxx dbname=syncv3_test sslmode=disable"

View File

@ -8,8 +8,8 @@ import (
"sync" "sync"
"github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib"
"github.com/matrix-org/sync-v3/internal" "github.com/matrix-org/sliding-sync/internal"
"github.com/matrix-org/sync-v3/state" "github.com/matrix-org/sliding-sync/state"
"github.com/rs/zerolog" "github.com/rs/zerolog"
"github.com/tidwall/gjson" "github.com/tidwall/gjson"
) )

View File

@ -6,10 +6,10 @@ import (
"encoding/json" "encoding/json"
"testing" "testing"
"github.com/matrix-org/sync-v3/state" "github.com/matrix-org/sliding-sync/state"
"github.com/matrix-org/sync-v3/sync3" "github.com/matrix-org/sliding-sync/sync3"
"github.com/matrix-org/sync-v3/sync3/caches" "github.com/matrix-org/sliding-sync/sync3/caches"
"github.com/matrix-org/sync-v3/testutils" "github.com/matrix-org/sliding-sync/testutils"
) )
func TestGlobalCacheLoadState(t *testing.T) { func TestGlobalCacheLoadState(t *testing.T) {

View File

@ -4,7 +4,7 @@ import (
"os" "os"
"testing" "testing"
"github.com/matrix-org/sync-v3/testutils" "github.com/matrix-org/sliding-sync/testutils"
) )
var postgresConnectionString = "user=xxxxx dbname=syncv3_test sslmode=disable" var postgresConnectionString = "user=xxxxx dbname=syncv3_test sslmode=disable"

View File

@ -3,8 +3,8 @@ package caches
import ( import (
"encoding/json" "encoding/json"
"github.com/matrix-org/sync-v3/internal" "github.com/matrix-org/sliding-sync/internal"
"github.com/matrix-org/sync-v3/state" "github.com/matrix-org/sliding-sync/state"
) )
type Update interface { type Update interface {

View File

@ -6,9 +6,9 @@ import (
"sync" "sync"
lru "github.com/hashicorp/golang-lru" lru "github.com/hashicorp/golang-lru"
"github.com/matrix-org/sync-v3/internal" "github.com/matrix-org/sliding-sync/internal"
"github.com/matrix-org/sync-v3/state" "github.com/matrix-org/sliding-sync/state"
"github.com/matrix-org/sync-v3/sync2" "github.com/matrix-org/sliding-sync/sync2"
"github.com/tidwall/gjson" "github.com/tidwall/gjson"
"github.com/tidwall/sjson" "github.com/tidwall/sjson"
) )

View File

@ -6,7 +6,7 @@ import (
"runtime/debug" "runtime/debug"
"sync" "sync"
"github.com/matrix-org/sync-v3/internal" "github.com/matrix-org/sliding-sync/internal"
) )
type ConnID struct { type ConnID struct {

View File

@ -8,7 +8,7 @@ import (
"testing" "testing"
"time" "time"
"github.com/matrix-org/sync-v3/internal" "github.com/matrix-org/sliding-sync/internal"
) )
type connHandlerMock struct { type connHandlerMock struct {

View File

@ -5,7 +5,7 @@ import (
"os" "os"
"sync" "sync"
"github.com/matrix-org/sync-v3/sync3/caches" "github.com/matrix-org/sliding-sync/sync3/caches"
"github.com/rs/zerolog" "github.com/rs/zerolog"
"github.com/tidwall/gjson" "github.com/tidwall/gjson"
) )

View File

@ -3,8 +3,8 @@ package extensions
import ( import (
"encoding/json" "encoding/json"
"github.com/matrix-org/sync-v3/state" "github.com/matrix-org/sliding-sync/state"
"github.com/matrix-org/sync-v3/sync3/caches" "github.com/matrix-org/sliding-sync/sync3/caches"
) )
// Client created request params // Client created request params

View File

@ -1,8 +1,8 @@
package extensions package extensions
import ( import (
"github.com/matrix-org/sync-v3/internal" "github.com/matrix-org/sliding-sync/internal"
"github.com/matrix-org/sync-v3/sync2" "github.com/matrix-org/sliding-sync/sync2"
) )
// Client created request params // Client created request params

View File

@ -3,9 +3,9 @@ package extensions
import ( import (
"os" "os"
"github.com/matrix-org/sync-v3/state" "github.com/matrix-org/sliding-sync/state"
"github.com/matrix-org/sync-v3/sync2" "github.com/matrix-org/sliding-sync/sync2"
"github.com/matrix-org/sync-v3/sync3/caches" "github.com/matrix-org/sliding-sync/sync3/caches"
"github.com/rs/zerolog" "github.com/rs/zerolog"
) )

View File

@ -3,8 +3,8 @@ package extensions
import ( import (
"encoding/json" "encoding/json"
"github.com/matrix-org/sync-v3/state" "github.com/matrix-org/sliding-sync/state"
"github.com/matrix-org/sync-v3/sync3/caches" "github.com/matrix-org/sliding-sync/sync3/caches"
) )
// Client created request params // Client created request params

View File

@ -5,7 +5,7 @@ import (
"fmt" "fmt"
"strconv" "strconv"
"github.com/matrix-org/sync-v3/state" "github.com/matrix-org/sliding-sync/state"
) )
// Client created request params // Client created request params

View File

@ -3,7 +3,7 @@ package extensions
import ( import (
"encoding/json" "encoding/json"
"github.com/matrix-org/sync-v3/sync3/caches" "github.com/matrix-org/sliding-sync/sync3/caches"
) )
// Client created request params // Client created request params

View File

@ -6,10 +6,10 @@ import (
"runtime/trace" "runtime/trace"
"time" "time"
"github.com/matrix-org/sync-v3/internal" "github.com/matrix-org/sliding-sync/internal"
"github.com/matrix-org/sync-v3/sync3" "github.com/matrix-org/sliding-sync/sync3"
"github.com/matrix-org/sync-v3/sync3/caches" "github.com/matrix-org/sliding-sync/sync3/caches"
"github.com/matrix-org/sync-v3/sync3/extensions" "github.com/matrix-org/sliding-sync/sync3/extensions"
"github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus"
"github.com/tidwall/gjson" "github.com/tidwall/gjson"
) )

View File

@ -6,10 +6,10 @@ import (
"runtime/trace" "runtime/trace"
"time" "time"
"github.com/matrix-org/sync-v3/internal" "github.com/matrix-org/sliding-sync/internal"
"github.com/matrix-org/sync-v3/sync3" "github.com/matrix-org/sliding-sync/sync3"
"github.com/matrix-org/sync-v3/sync3/caches" "github.com/matrix-org/sliding-sync/sync3/caches"
"github.com/matrix-org/sync-v3/sync3/extensions" "github.com/matrix-org/sliding-sync/sync3/extensions"
) )
var ( var (

View File

@ -9,11 +9,11 @@ import (
"time" "time"
"github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib"
"github.com/matrix-org/sync-v3/internal" "github.com/matrix-org/sliding-sync/internal"
"github.com/matrix-org/sync-v3/sync3" "github.com/matrix-org/sliding-sync/sync3"
"github.com/matrix-org/sync-v3/sync3/caches" "github.com/matrix-org/sliding-sync/sync3/caches"
"github.com/matrix-org/sync-v3/sync3/extensions" "github.com/matrix-org/sliding-sync/sync3/extensions"
"github.com/matrix-org/sync-v3/testutils" "github.com/matrix-org/sliding-sync/testutils"
) )
type NopExtensionHandler struct{} type NopExtensionHandler struct{}
@ -407,7 +407,7 @@ func TestConnStateMultipleRanges(t *testing.T) {
}) })
} }
// Regression test for https://github.com/matrix-org/sync-v3/commit/732ea46f1ccde2b6a382e0f849bbd166b80900ed // Regression test
func TestBumpToOutsideRange(t *testing.T) { func TestBumpToOutsideRange(t *testing.T) {
ConnID := sync3.ConnID{ ConnID := sync3.ConnID{
DeviceID: "d", DeviceID: "d",

View File

@ -3,7 +3,7 @@ package handler
import ( import (
"sync" "sync"
"github.com/matrix-org/sync-v3/pubsub" "github.com/matrix-org/sliding-sync/pubsub"
) )
type pendingInfo struct { type pendingInfo struct {

View File

@ -11,13 +11,13 @@ import (
"sync" "sync"
"time" "time"
"github.com/matrix-org/sync-v3/internal" "github.com/matrix-org/sliding-sync/internal"
"github.com/matrix-org/sync-v3/pubsub" "github.com/matrix-org/sliding-sync/pubsub"
"github.com/matrix-org/sync-v3/state" "github.com/matrix-org/sliding-sync/state"
"github.com/matrix-org/sync-v3/sync2" "github.com/matrix-org/sliding-sync/sync2"
"github.com/matrix-org/sync-v3/sync3" "github.com/matrix-org/sliding-sync/sync3"
"github.com/matrix-org/sync-v3/sync3/caches" "github.com/matrix-org/sliding-sync/sync3/caches"
"github.com/matrix-org/sync-v3/sync3/extensions" "github.com/matrix-org/sliding-sync/sync3/extensions"
"github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus"
"github.com/rs/zerolog" "github.com/rs/zerolog"
"github.com/rs/zerolog/hlog" "github.com/rs/zerolog/hlog"

View File

@ -4,8 +4,8 @@ import (
"fmt" "fmt"
"sort" "sort"
"github.com/matrix-org/sync-v3/internal" "github.com/matrix-org/sliding-sync/internal"
"github.com/matrix-org/sync-v3/sync3" "github.com/matrix-org/sliding-sync/sync3"
) )
// RoomsBuilder gradually accumulates and mixes data required in order to populate the top-level rooms key // RoomsBuilder gradually accumulates and mixes data required in order to populate the top-level rooms key

View File

@ -6,7 +6,7 @@ import (
"strings" "strings"
"testing" "testing"
"github.com/matrix-org/sync-v3/sync3" "github.com/matrix-org/sliding-sync/sync3"
) )
func TestRoomsBuilder(t *testing.T) { func TestRoomsBuilder(t *testing.T) {

View File

@ -3,7 +3,7 @@ package sync3
import ( import (
"strings" "strings"
"github.com/matrix-org/sync-v3/internal" "github.com/matrix-org/sliding-sync/internal"
) )
type OverwriteVal bool type OverwriteVal bool

View File

@ -4,7 +4,7 @@ import (
"os" "os"
"testing" "testing"
"github.com/matrix-org/sync-v3/testutils" "github.com/matrix-org/sliding-sync/testutils"
"github.com/rs/zerolog" "github.com/rs/zerolog"
) )

View File

@ -6,7 +6,7 @@ import (
"math/rand" "math/rand"
"testing" "testing"
"github.com/matrix-org/sync-v3/testutils" "github.com/matrix-org/sliding-sync/testutils"
) )
func TestCalculateListOps_BasicOperations(t *testing.T) { func TestCalculateListOps_BasicOperations(t *testing.T) {

View File

@ -5,8 +5,8 @@ import (
"encoding/json" "encoding/json"
"strings" "strings"
"github.com/matrix-org/sync-v3/internal" "github.com/matrix-org/sliding-sync/internal"
"github.com/matrix-org/sync-v3/sync3/extensions" "github.com/matrix-org/sliding-sync/sync3/extensions"
) )
var ( var (

View File

@ -4,7 +4,7 @@ import (
"encoding/json" "encoding/json"
"strconv" "strconv"
"github.com/matrix-org/sync-v3/sync3/extensions" "github.com/matrix-org/sliding-sync/sync3/extensions"
"github.com/tidwall/gjson" "github.com/tidwall/gjson"
) )

View File

@ -3,8 +3,8 @@ package sync3
import ( import (
"encoding/json" "encoding/json"
"github.com/matrix-org/sync-v3/internal" "github.com/matrix-org/sliding-sync/internal"
"github.com/matrix-org/sync-v3/sync3/caches" "github.com/matrix-org/sliding-sync/sync3/caches"
) )
type Room struct { type Room struct {

View File

@ -4,7 +4,7 @@ import (
"fmt" "fmt"
"sort" "sort"
"github.com/matrix-org/sync-v3/internal" "github.com/matrix-org/sliding-sync/internal"
) )
type RoomFinder interface { type RoomFinder interface {

View File

@ -5,8 +5,8 @@ import (
"strings" "strings"
"testing" "testing"
"github.com/matrix-org/sync-v3/internal" "github.com/matrix-org/sliding-sync/internal"
"github.com/matrix-org/sync-v3/sync3/caches" "github.com/matrix-org/sliding-sync/sync3/caches"
) )
type finder struct { type finder struct {

View File

@ -19,7 +19,7 @@ import (
"time" "time"
"github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib"
"github.com/matrix-org/sync-v3/sync3" "github.com/matrix-org/sliding-sync/sync3"
"github.com/tidwall/gjson" "github.com/tidwall/gjson"
) )

View File

@ -3,8 +3,8 @@ package syncv3_test
import ( import (
"testing" "testing"
"github.com/matrix-org/sync-v3/sync3" "github.com/matrix-org/sliding-sync/sync3"
"github.com/matrix-org/sync-v3/testutils/m" "github.com/matrix-org/sliding-sync/testutils/m"
) )
func TestLazyLoading(t *testing.T) { func TestLazyLoading(t *testing.T) {

View File

@ -6,8 +6,8 @@ import (
"testing" "testing"
"time" "time"
"github.com/matrix-org/sync-v3/sync3" "github.com/matrix-org/sliding-sync/sync3"
"github.com/matrix-org/sync-v3/testutils/m" "github.com/matrix-org/sliding-sync/testutils/m"
) )
// Test that multiple lists can be independently scrolled through // Test that multiple lists can be independently scrolled through

View File

@ -11,8 +11,8 @@ import (
"testing" "testing"
"time" "time"
"github.com/matrix-org/sync-v3/sync3" "github.com/matrix-org/sliding-sync/sync3"
"github.com/matrix-org/sync-v3/testutils/m" "github.com/matrix-org/sliding-sync/testutils/m"
) )
var ( var (

View File

@ -4,8 +4,8 @@ import (
"testing" "testing"
"time" "time"
"github.com/matrix-org/sync-v3/sync3" "github.com/matrix-org/sliding-sync/sync3"
"github.com/matrix-org/sync-v3/testutils/m" "github.com/matrix-org/sliding-sync/testutils/m"
) )
func TestRoomStateTransitions(t *testing.T) { func TestRoomStateTransitions(t *testing.T) {

View File

@ -3,8 +3,8 @@ package syncv3_test
import ( import (
"testing" "testing"
"github.com/matrix-org/sync-v3/sync3" "github.com/matrix-org/sliding-sync/sync3"
"github.com/matrix-org/sync-v3/testutils/m" "github.com/matrix-org/sliding-sync/testutils/m"
) )
func TestNumLive(t *testing.T) { func TestNumLive(t *testing.T) {

View File

@ -6,7 +6,7 @@ import (
"net/url" "net/url"
"testing" "testing"
"github.com/matrix-org/sync-v3/sync3" "github.com/matrix-org/sliding-sync/sync3"
) )
func TestPrevBatch(t *testing.T) { func TestPrevBatch(t *testing.T) {

View File

@ -4,9 +4,9 @@ import (
"testing" "testing"
"time" "time"
"github.com/matrix-org/sync-v3/sync3" "github.com/matrix-org/sliding-sync/sync3"
"github.com/matrix-org/sync-v3/sync3/extensions" "github.com/matrix-org/sliding-sync/sync3/extensions"
"github.com/matrix-org/sync-v3/testutils/m" "github.com/matrix-org/sliding-sync/testutils/m"
) )
// Test that receipts are sent initially and during live streams // Test that receipts are sent initially and during live streams

View File

@ -5,8 +5,8 @@ import (
"testing" "testing"
"time" "time"
"github.com/matrix-org/sync-v3/sync3" "github.com/matrix-org/sliding-sync/sync3"
"github.com/matrix-org/sync-v3/testutils/m" "github.com/matrix-org/sliding-sync/testutils/m"
) )
// The purpose of these tests is to ensure that events for one user cannot leak to another user. // The purpose of these tests is to ensure that events for one user cannot leak to another user.

View File

@ -4,8 +4,8 @@ import (
"testing" "testing"
"time" "time"
"github.com/matrix-org/sync-v3/sync3" "github.com/matrix-org/sliding-sync/sync3"
"github.com/matrix-org/sync-v3/testutils/m" "github.com/matrix-org/sliding-sync/testutils/m"
) )
// Make this graph: // Make this graph:

View File

@ -8,8 +8,8 @@ import (
"github.com/matrix-org/util" "github.com/matrix-org/util"
"github.com/tidwall/gjson" "github.com/tidwall/gjson"
"github.com/matrix-org/sync-v3/sync3" "github.com/matrix-org/sliding-sync/sync3"
"github.com/matrix-org/sync-v3/sync3/extensions" "github.com/matrix-org/sliding-sync/sync3/extensions"
) )
// Test that if you login to an account -> send a to-device message to this device -> initial proxy connection // Test that if you login to an account -> send a to-device message to this device -> initial proxy connection

View File

@ -6,8 +6,8 @@ import (
"testing" "testing"
"time" "time"
"github.com/matrix-org/sync-v3/sync3" "github.com/matrix-org/sliding-sync/sync3"
"github.com/matrix-org/sync-v3/testutils/m" "github.com/matrix-org/sliding-sync/testutils/m"
"github.com/tidwall/gjson" "github.com/tidwall/gjson"
) )

View File

@ -8,9 +8,9 @@ import (
"testing" "testing"
"time" "time"
"github.com/matrix-org/sync-v3/sync3" "github.com/matrix-org/sliding-sync/sync3"
"github.com/matrix-org/sync-v3/sync3/extensions" "github.com/matrix-org/sliding-sync/sync3/extensions"
"github.com/matrix-org/sync-v3/testutils/m" "github.com/matrix-org/sliding-sync/testutils/m"
"github.com/tidwall/gjson" "github.com/tidwall/gjson"
) )

View File

@ -6,9 +6,9 @@ import (
"testing" "testing"
"time" "time"
"github.com/matrix-org/sync-v3/sync2" "github.com/matrix-org/sliding-sync/sync2"
"github.com/matrix-org/sync-v3/sync3" "github.com/matrix-org/sliding-sync/sync3"
"github.com/matrix-org/sync-v3/testutils" "github.com/matrix-org/sliding-sync/testutils"
"github.com/rs/zerolog" "github.com/rs/zerolog"
) )

View File

@ -7,10 +7,10 @@ import (
"testing" "testing"
"time" "time"
"github.com/matrix-org/sync-v3/sync2" "github.com/matrix-org/sliding-sync/sync2"
"github.com/matrix-org/sync-v3/sync3" "github.com/matrix-org/sliding-sync/sync3"
"github.com/matrix-org/sync-v3/testutils" "github.com/matrix-org/sliding-sync/testutils"
"github.com/matrix-org/sync-v3/testutils/m" "github.com/matrix-org/sliding-sync/testutils/m"
"github.com/tidwall/gjson" "github.com/tidwall/gjson"
) )

View File

@ -6,11 +6,11 @@ import (
"testing" "testing"
"time" "time"
"github.com/matrix-org/sync-v3/sync2" "github.com/matrix-org/sliding-sync/sync2"
"github.com/matrix-org/sync-v3/sync3" "github.com/matrix-org/sliding-sync/sync3"
"github.com/matrix-org/sync-v3/sync3/extensions" "github.com/matrix-org/sliding-sync/sync3/extensions"
"github.com/matrix-org/sync-v3/testutils" "github.com/matrix-org/sliding-sync/testutils"
"github.com/matrix-org/sync-v3/testutils/m" "github.com/matrix-org/sliding-sync/testutils/m"
) )
var valTrue = true var valTrue = true

View File

@ -4,10 +4,10 @@ import (
"encoding/json" "encoding/json"
"testing" "testing"
"github.com/matrix-org/sync-v3/sync2" "github.com/matrix-org/sliding-sync/sync2"
"github.com/matrix-org/sync-v3/sync3" "github.com/matrix-org/sliding-sync/sync3"
"github.com/matrix-org/sync-v3/testutils" "github.com/matrix-org/sliding-sync/testutils"
"github.com/matrix-org/sync-v3/testutils/m" "github.com/matrix-org/sliding-sync/testutils/m"
) )
// Test that filters work initially and whilst streamed. // Test that filters work initially and whilst streamed.

View File

@ -4,10 +4,10 @@ import (
"testing" "testing"
"time" "time"
"github.com/matrix-org/sync-v3/sync2" "github.com/matrix-org/sliding-sync/sync2"
"github.com/matrix-org/sync-v3/sync3" "github.com/matrix-org/sliding-sync/sync3"
"github.com/matrix-org/sync-v3/testutils" "github.com/matrix-org/sliding-sync/testutils"
"github.com/matrix-org/sync-v3/testutils/m" "github.com/matrix-org/sliding-sync/testutils/m"
) )
func TestStuckInvites(t *testing.T) { func TestStuckInvites(t *testing.T) {

View File

@ -8,9 +8,9 @@ import (
"testing" "testing"
"time" "time"
"github.com/matrix-org/sync-v3/sync2" "github.com/matrix-org/sliding-sync/sync2"
"github.com/matrix-org/sync-v3/sync3" "github.com/matrix-org/sliding-sync/sync3"
"github.com/matrix-org/sync-v3/testutils" "github.com/matrix-org/sliding-sync/testutils"
"github.com/prometheus/client_golang/prometheus/promhttp" "github.com/prometheus/client_golang/prometheus/promhttp"
) )

View File

@ -6,10 +6,10 @@ import (
"testing" "testing"
"time" "time"
"github.com/matrix-org/sync-v3/sync2" "github.com/matrix-org/sliding-sync/sync2"
"github.com/matrix-org/sync-v3/sync3" "github.com/matrix-org/sliding-sync/sync3"
"github.com/matrix-org/sync-v3/testutils" "github.com/matrix-org/sliding-sync/testutils"
"github.com/matrix-org/sync-v3/testutils/m" "github.com/matrix-org/sliding-sync/testutils/m"
) )
// Test that sort operations that favour notif counts always appear at the start of the list. // Test that sort operations that favour notif counts always appear at the start of the list.

View File

@ -6,9 +6,9 @@ import (
"testing" "testing"
"time" "time"
"github.com/matrix-org/sync-v3/sync2" "github.com/matrix-org/sliding-sync/sync2"
"github.com/matrix-org/sync-v3/sync3" "github.com/matrix-org/sliding-sync/sync3"
"github.com/matrix-org/sync-v3/testutils" "github.com/matrix-org/sliding-sync/testutils"
) )
type FlushEnum int type FlushEnum int

View File

@ -6,10 +6,10 @@ import (
"testing" "testing"
"time" "time"
"github.com/matrix-org/sync-v3/sync2" "github.com/matrix-org/sliding-sync/sync2"
"github.com/matrix-org/sync-v3/sync3" "github.com/matrix-org/sliding-sync/sync3"
"github.com/matrix-org/sync-v3/testutils" "github.com/matrix-org/sliding-sync/testutils"
"github.com/matrix-org/sync-v3/testutils/m" "github.com/matrix-org/sliding-sync/testutils/m"
) )
// Test that room names come through sanely. Additional testing to ensure we copy hero slices correctly. // Test that room names come through sanely. Additional testing to ensure we copy hero slices correctly.

View File

@ -5,10 +5,10 @@ import (
"testing" "testing"
"time" "time"
"github.com/matrix-org/sync-v3/sync2" "github.com/matrix-org/sliding-sync/sync2"
"github.com/matrix-org/sync-v3/sync3" "github.com/matrix-org/sliding-sync/sync3"
"github.com/matrix-org/sync-v3/testutils" "github.com/matrix-org/sliding-sync/testutils"
"github.com/matrix-org/sync-v3/testutils/m" "github.com/matrix-org/sliding-sync/testutils/m"
) )
// Test that if you /join a room and then immediately add a room subscription for said room before the // Test that if you /join a room and then immediately add a room subscription for said room before the

View File

@ -6,10 +6,10 @@ import (
"testing" "testing"
"time" "time"
"github.com/matrix-org/sync-v3/sync2" "github.com/matrix-org/sliding-sync/sync2"
"github.com/matrix-org/sync-v3/sync3" "github.com/matrix-org/sliding-sync/sync3"
"github.com/matrix-org/sync-v3/testutils" "github.com/matrix-org/sliding-sync/testutils"
"github.com/matrix-org/sync-v3/testutils/m" "github.com/matrix-org/sliding-sync/testutils/m"
) )
// - Test that you can get all rooms initially for a list // - Test that you can get all rooms initially for a list

View File

@ -6,10 +6,10 @@ import (
"testing" "testing"
"time" "time"
"github.com/matrix-org/sync-v3/sync2" "github.com/matrix-org/sliding-sync/sync2"
"github.com/matrix-org/sync-v3/sync3" "github.com/matrix-org/sliding-sync/sync3"
"github.com/matrix-org/sync-v3/testutils" "github.com/matrix-org/sliding-sync/testutils"
"github.com/matrix-org/sync-v3/testutils/m" "github.com/matrix-org/sliding-sync/testutils/m"
"github.com/tidwall/sjson" "github.com/tidwall/sjson"
) )

View File

@ -17,13 +17,13 @@ import (
"github.com/gorilla/mux" "github.com/gorilla/mux"
"github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib"
syncv3 "github.com/matrix-org/sync-v3" syncv3 "github.com/matrix-org/sliding-sync"
"github.com/matrix-org/sync-v3/sync2" "github.com/matrix-org/sliding-sync/sync2"
"github.com/matrix-org/sync-v3/sync2/handler2" "github.com/matrix-org/sliding-sync/sync2/handler2"
"github.com/matrix-org/sync-v3/sync3" "github.com/matrix-org/sliding-sync/sync3"
"github.com/matrix-org/sync-v3/sync3/handler" "github.com/matrix-org/sliding-sync/sync3/handler"
"github.com/matrix-org/sync-v3/testutils" "github.com/matrix-org/sliding-sync/testutils"
"github.com/matrix-org/sync-v3/testutils/m" "github.com/matrix-org/sliding-sync/testutils/m"
"github.com/tidwall/gjson" "github.com/tidwall/gjson"
) )

View File

@ -8,7 +8,7 @@ import (
"sort" "sort"
"testing" "testing"
"github.com/matrix-org/sync-v3/sync3" "github.com/matrix-org/sliding-sync/sync3"
"github.com/tidwall/gjson" "github.com/tidwall/gjson"
) )

14
v3.go
View File

@ -1,4 +1,4 @@
package syncv3 package slidingsync
import ( import (
"encoding/json" "encoding/json"
@ -9,12 +9,12 @@ import (
"time" "time"
"github.com/gorilla/mux" "github.com/gorilla/mux"
"github.com/matrix-org/sync-v3/internal" "github.com/matrix-org/sliding-sync/internal"
"github.com/matrix-org/sync-v3/pubsub" "github.com/matrix-org/sliding-sync/pubsub"
"github.com/matrix-org/sync-v3/state" "github.com/matrix-org/sliding-sync/state"
"github.com/matrix-org/sync-v3/sync2" "github.com/matrix-org/sliding-sync/sync2"
"github.com/matrix-org/sync-v3/sync2/handler2" "github.com/matrix-org/sliding-sync/sync2/handler2"
"github.com/matrix-org/sync-v3/sync3/handler" "github.com/matrix-org/sliding-sync/sync3/handler"
"github.com/rs/zerolog" "github.com/rs/zerolog"
"github.com/rs/zerolog/hlog" "github.com/rs/zerolog/hlog"
) )