refactor - moved common code to livekit/protocol

This commit is contained in:
David Zhao
2021-03-13 22:01:51 -08:00
parent e20c831c14
commit 7d02c01fd8
79 changed files with 6771 additions and 1410 deletions
+1 -1
View File
@@ -8,7 +8,7 @@ import (
"github.com/twitchtv/twirp"
"github.com/livekit/livekit-server/pkg/auth"
"github.com/livekit/protocol/auth"
)
const (
+2 -2
View File
@@ -7,9 +7,9 @@ import (
"github.com/stretchr/testify/assert"
"github.com/livekit/livekit-server/pkg/auth"
"github.com/livekit/livekit-server/pkg/auth/authfakes"
"github.com/livekit/livekit-server/pkg/service"
"github.com/livekit/protocol/auth"
"github.com/livekit/protocol/auth/authfakes"
)
func TestAuthMiddleware(t *testing.T) {
+1 -1
View File
@@ -6,7 +6,7 @@ import (
"github.com/thoas/go-funk"
"github.com/livekit/livekit-server/proto/livekit"
livekit "github.com/livekit/livekit-server/proto"
)
// encapsulates CRUD operations for room settings
+1 -1
View File
@@ -8,7 +8,7 @@ import (
"github.com/pkg/errors"
"google.golang.org/protobuf/proto"
"github.com/livekit/livekit-server/proto/livekit"
livekit "github.com/livekit/livekit-server/proto"
)
const (
+1 -1
View File
@@ -6,7 +6,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/livekit/livekit-server/pkg/service"
"github.com/livekit/livekit-server/proto/livekit"
livekit "github.com/livekit/livekit-server/proto"
)
func TestParticipantPersisence(t *testing.T) {
+2 -2
View File
@@ -13,8 +13,8 @@ import (
"github.com/livekit/livekit-server/pkg/routing"
"github.com/livekit/livekit-server/pkg/rtc"
"github.com/livekit/livekit-server/pkg/rtc/types"
"github.com/livekit/livekit-server/pkg/utils"
"github.com/livekit/livekit-server/proto/livekit"
livekit "github.com/livekit/livekit-server/proto"
"github.com/livekit/protocol/utils"
)
const (
+1 -1
View File
@@ -7,7 +7,7 @@ import (
"github.com/thoas/go-funk"
"github.com/twitchtv/twirp"
"github.com/livekit/livekit-server/proto/livekit"
livekit "github.com/livekit/livekit-server/proto"
)
// A rooms service that supports a single node
+1 -1
View File
@@ -1,7 +1,7 @@
package service
import (
"github.com/livekit/livekit-server/proto/livekit"
livekit "github.com/livekit/livekit-server/proto"
)
//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -generate
+1 -1
View File
@@ -13,7 +13,7 @@ import (
"github.com/livekit/livekit-server/pkg/logger"
"github.com/livekit/livekit-server/pkg/routing"
"github.com/livekit/livekit-server/pkg/rtc"
"github.com/livekit/livekit-server/proto/livekit"
livekit "github.com/livekit/livekit-server/proto"
)
type RTCService struct {
+3 -3
View File
@@ -11,13 +11,13 @@ import (
"github.com/pion/turn/v2"
"github.com/urfave/negroni"
"github.com/livekit/livekit-server/pkg/auth"
"github.com/livekit/livekit-server/pkg/config"
"github.com/livekit/livekit-server/pkg/logger"
"github.com/livekit/livekit-server/pkg/routing"
"github.com/livekit/livekit-server/pkg/utils"
"github.com/livekit/livekit-server/proto/livekit"
livekit "github.com/livekit/livekit-server/proto"
"github.com/livekit/livekit-server/version"
"github.com/livekit/protocol/auth"
"github.com/livekit/protocol/utils"
)
type LivekitServer struct {
+1 -1
View File
@@ -5,7 +5,7 @@ import (
"sync"
"github.com/livekit/livekit-server/pkg/service"
"github.com/livekit/livekit-server/proto/livekit"
livekit "github.com/livekit/livekit-server/proto"
)
type FakeRoomStore struct {
+1 -1
View File
@@ -8,7 +8,7 @@ import (
"github.com/livekit/livekit-server/pkg/config"
"github.com/livekit/livekit-server/pkg/logger"
"github.com/livekit/livekit-server/proto/livekit"
livekit "github.com/livekit/livekit-server/proto"
)
var ServiceSet = wire.NewSet(
+1 -1
View File
@@ -5,9 +5,9 @@ package service
import (
"github.com/google/wire"
"github.com/livekit/livekit-server/pkg/auth"
"github.com/livekit/livekit-server/pkg/config"
"github.com/livekit/livekit-server/pkg/routing"
"github.com/livekit/protocol/auth"
)
func InitializeServer(conf *config.Config, keyProvider auth.KeyProvider,
+1 -1
View File
@@ -6,9 +6,9 @@
package service
import (
"github.com/livekit/livekit-server/pkg/auth"
"github.com/livekit/livekit-server/pkg/config"
"github.com/livekit/livekit-server/pkg/routing"
"github.com/livekit/protocol/auth"
)
// Injectors from wire.go:
+1 -1
View File
@@ -10,7 +10,7 @@ import (
"github.com/livekit/livekit-server/pkg/logger"
"github.com/livekit/livekit-server/pkg/rtc/types"
"github.com/livekit/livekit-server/proto/livekit"
livekit "github.com/livekit/livekit-server/proto"
)
const (