summaryrefslogtreecommitdiff
path: root/danmaku/dmpkg
diff options
context:
space:
mode:
authorKeuin <[email protected]>2023-07-11 22:56:07 +0800
committerKeuin <[email protected]>2023-07-11 22:56:07 +0800
commitf5c63cde56eb35c0125a0545f084441cdd4340ab (patch)
treecf24779daaa3067902bef91d21bcdee7a78fd059 /danmaku/dmpkg
parent7fd817f6d1ead3de85294c1893a6e1572a1d12e3 (diff)
Refactor: move data structures to a separate package to avoid circular dependency.
Diffstat (limited to 'danmaku/dmpkg')
-rw-r--r--danmaku/dmpkg/auth.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/danmaku/dmpkg/auth.go b/danmaku/dmpkg/auth.go
index bb66f1d..b6a90d3 100644
--- a/danmaku/dmpkg/auth.go
+++ b/danmaku/dmpkg/auth.go
@@ -8,20 +8,20 @@ package dmpkg
import (
"encoding/json"
"fmt"
- "github.com/keuin/slbr/bilibili"
+ "github.com/keuin/slbr/types"
)
type authInfo struct {
- UID uint64 `json:"uid"`
- RoomId bilibili.RoomId `json:"roomid"`
- ProtoVer int `json:"protover"`
- Platform string `json:"platform"`
- Type int `json:"type"`
- Key string `json:"key"`
+ UID uint64 `json:"uid"`
+ RoomId types.RoomId `json:"roomid"`
+ ProtoVer int `json:"protover"`
+ Platform string `json:"platform"`
+ Type int `json:"type"`
+ Key string `json:"key"`
}
// NewAuth creates a new authentication exchange.
-func NewAuth(protocol ProtocolVer, roomId bilibili.RoomId, authKey string) (exc DanmakuExchange) {
+func NewAuth(protocol ProtocolVer, roomId types.RoomId, authKey string) (exc DanmakuExchange) {
exc, _ = NewPlainExchange(OpConnect, authInfo{
UID: UidGuest,
RoomId: roomId,