Documentation ¶
Index ¶
- Constants
- Variables
- func DouyuPath(path string) string
- func NewExtraKey() *extraKey
- func NewKeySet() *keySet
- func ParseUid(s string) (int64, error)
- type Avatar
- func (*Avatar) Descriptor() ([]byte, []int)
- func (m *Avatar) GetBig() string
- func (m *Avatar) GetMiddle() string
- func (m *Avatar) GetSmall() string
- func (*Avatar) ProtoMessage()
- func (m *Avatar) Reset()
- func (m *Avatar) String() string
- func (m *Avatar) XXX_DiscardUnknown()
- func (m *Avatar) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Avatar) XXX_Merge(src proto.Message)
- func (m *Avatar) XXX_Size() int
- func (m *Avatar) XXX_Unmarshal(b []byte) error
- type BetardResponse
- func (*BetardResponse) Descriptor() ([]byte, []int)
- func (m *BetardResponse) GetRoom() *Room
- func (*BetardResponse) ProtoMessage()
- func (m *BetardResponse) Reset()
- func (m *BetardResponse) String() string
- func (m *BetardResponse) XXX_DiscardUnknown()
- func (m *BetardResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *BetardResponse) XXX_Merge(src proto.Message)
- func (m *BetardResponse) XXX_Size() int
- func (m *BetardResponse) XXX_Unmarshal(b []byte) error
- type Concern
- func (c *Concern) Add(groupCode int64, id int64, ctype concern.Type) (*LiveInfo, error)
- func (l Concern) CurrentLiveKey(keys ...interface{}) string
- func (c *Concern) FindOrLoadRoom(roomId int64) (*LiveInfo, error)
- func (c *Concern) FindRoom(id int64, load bool) (*LiveInfo, error)
- func (c *Concern) ListWatching(groupCode int64, p concern.Type) ([]*LiveInfo, []concern.Type, error)
- func (c *Concern) Start()
- type ConcernEvent
- type ConcernLiveNotify
- type EventType
- type LiveInfo
- func (*LiveInfo) Descriptor() ([]byte, []int)
- func (m *LiveInfo) GetAvatar() *Avatar
- func (m *LiveInfo) GetNickname() string
- func (m *LiveInfo) GetRoomId() int64
- func (m *LiveInfo) GetRoomName() string
- func (m *LiveInfo) GetRoomUrl() string
- func (m *LiveInfo) GetShowStatus() ShowStatus
- func (m *LiveInfo) GetVideoLoop() VideoLoopStatus
- func (m *LiveInfo) Living() bool
- func (*LiveInfo) ProtoMessage()
- func (m *LiveInfo) Reset()
- func (m *LiveInfo) String() string
- func (m *LiveInfo) ToString() string
- func (m *LiveInfo) Type() EventType
- func (m *LiveInfo) XXX_DiscardUnknown()
- func (m *LiveInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LiveInfo) XXX_Merge(src proto.Message)
- func (m *LiveInfo) XXX_Size() int
- func (m *LiveInfo) XXX_Unmarshal(b []byte) error
- type Room
- func (*Room) Descriptor() ([]byte, []int)
- func (m *Room) GetAvatar() *Avatar
- func (m *Room) GetNickname() string
- func (m *Room) GetRoomId() int64
- func (m *Room) GetRoomName() string
- func (m *Room) GetRoomUrl() string
- func (m *Room) GetShowStatus() ShowStatus
- func (m *Room) GetVideoLoop() VideoLoopStatus
- func (*Room) ProtoMessage()
- func (m *Room) Reset()
- func (m *Room) String() string
- func (m *Room) XXX_DiscardUnknown()
- func (m *Room) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Room) XXX_Merge(src proto.Message)
- func (m *Room) XXX_Size() int
- func (m *Room) XXX_Unmarshal(b []byte) error
- type ShowStatus
- type StateManager
- type VideoLoopStatus
Constants ¶
View Source
const ( Site = "douyu" Host = "https://www.douyu.com" )
View Source
const (
PathBetard = "/betard"
)
Variables ¶
View Source
var ShowStatus_name = map[int32]string{
0: "Unknown",
1: "Living",
2: "NoLiving",
}
View Source
var ShowStatus_value = map[string]int32{
"Unknown": 0,
"Living": 1,
"NoLiving": 2,
}
View Source
var VideoLoopStatus_name = map[int32]string{
0: "Off",
1: "On",
}
View Source
var VideoLoopStatus_value = map[string]int32{
"Off": 0,
"On": 1,
}
Functions ¶
func NewExtraKey ¶
func NewExtraKey() *extraKey
Types ¶
type Avatar ¶
type Avatar struct { Big string `protobuf:"bytes,1,opt,name=big,proto3" json:"big,omitempty"` Middle string `protobuf:"bytes,2,opt,name=middle,proto3" json:"middle,omitempty"` Small string `protobuf:"bytes,3,opt,name=small,proto3" json:"small,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Avatar) Descriptor ¶
func (*Avatar) ProtoMessage ¶
func (*Avatar) ProtoMessage()
func (*Avatar) XXX_DiscardUnknown ¶
func (m *Avatar) XXX_DiscardUnknown()
func (*Avatar) XXX_Marshal ¶
func (*Avatar) XXX_Unmarshal ¶
type BetardResponse ¶
type BetardResponse struct { Room *Room `protobuf:"bytes,1,opt,name=room,proto3" json:"room,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func Betard ¶
func Betard(id int64) (*BetardResponse, error)
func (*BetardResponse) Descriptor ¶
func (*BetardResponse) Descriptor() ([]byte, []int)
func (*BetardResponse) GetRoom ¶
func (m *BetardResponse) GetRoom() *Room
func (*BetardResponse) ProtoMessage ¶
func (*BetardResponse) ProtoMessage()
func (*BetardResponse) Reset ¶
func (m *BetardResponse) Reset()
func (*BetardResponse) String ¶
func (m *BetardResponse) String() string
func (*BetardResponse) XXX_DiscardUnknown ¶
func (m *BetardResponse) XXX_DiscardUnknown()
func (*BetardResponse) XXX_Marshal ¶
func (m *BetardResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*BetardResponse) XXX_Merge ¶
func (m *BetardResponse) XXX_Merge(src proto.Message)
func (*BetardResponse) XXX_Size ¶
func (m *BetardResponse) XXX_Size() int
func (*BetardResponse) XXX_Unmarshal ¶
func (m *BetardResponse) XXX_Unmarshal(b []byte) error
type Concern ¶
type Concern struct { *StateManager // contains filtered or unexported fields }
func NewConcern ¶
func (Concern) CurrentLiveKey ¶
func (l Concern) CurrentLiveKey(keys ...interface{}) string
func (*Concern) FindOrLoadRoom ¶ added in v0.0.9
func (*Concern) ListWatching ¶ added in v0.0.8
type ConcernEvent ¶
type ConcernEvent interface {
Type() EventType
}
type ConcernLiveNotify ¶
func NewConcernLiveNotify ¶
func NewConcernLiveNotify(groupCode int64, l *LiveInfo) *ConcernLiveNotify
func (*ConcernLiveNotify) GetGroupCode ¶ added in v0.0.10
func (notify *ConcernLiveNotify) GetGroupCode() int64
func (*ConcernLiveNotify) GetUid ¶ added in v0.0.10
func (notify *ConcernLiveNotify) GetUid() interface{}
func (*ConcernLiveNotify) ShouldSend ¶ added in v0.0.10
func (notify *ConcernLiveNotify) ShouldSend() bool
func (*ConcernLiveNotify) ToMessage ¶ added in v0.0.10
func (notify *ConcernLiveNotify) ToMessage() []message.IMessageElement
func (*ConcernLiveNotify) Type ¶
func (notify *ConcernLiveNotify) Type() concern.Type
type LiveInfo ¶
type LiveInfo struct { Nickname string `protobuf:"bytes,1,opt,name=nickname,proto3" json:"nickname,omitempty"` RoomId int64 `protobuf:"varint,2,opt,name=room_id,json=roomId,proto3" json:"room_id,omitempty"` RoomName string `protobuf:"bytes,3,opt,name=room_name,json=roomName,proto3" json:"room_name,omitempty"` RoomUrl string `protobuf:"bytes,4,opt,name=room_url,json=roomUrl,proto3" json:"room_url,omitempty"` ShowStatus ShowStatus `protobuf:"varint,5,opt,name=show_status,json=showStatus,proto3,enum=douyu.ShowStatus" json:"show_status,omitempty"` VideoLoop VideoLoopStatus `protobuf:"varint,6,opt,name=videoLoop,proto3,enum=douyu.VideoLoopStatus" json:"videoLoop,omitempty"` Avatar *Avatar `protobuf:"bytes,7,opt,name=avatar,proto3" json:"avatar,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*LiveInfo) Descriptor ¶
func (*LiveInfo) GetNickname ¶
func (*LiveInfo) GetRoomName ¶
func (*LiveInfo) GetRoomUrl ¶
func (*LiveInfo) GetShowStatus ¶
func (m *LiveInfo) GetShowStatus() ShowStatus
func (*LiveInfo) GetVideoLoop ¶
func (m *LiveInfo) GetVideoLoop() VideoLoopStatus
func (*LiveInfo) ProtoMessage ¶
func (*LiveInfo) ProtoMessage()
func (*LiveInfo) XXX_DiscardUnknown ¶
func (m *LiveInfo) XXX_DiscardUnknown()
func (*LiveInfo) XXX_Marshal ¶
func (*LiveInfo) XXX_Unmarshal ¶
type Room ¶
type Room struct { Nickname string `protobuf:"bytes,1,opt,name=nickname,proto3" json:"nickname,omitempty"` RoomId int64 `protobuf:"varint,2,opt,name=room_id,json=roomId,proto3" json:"room_id,omitempty"` RoomName string `protobuf:"bytes,3,opt,name=room_name,json=roomName,proto3" json:"room_name,omitempty"` RoomUrl string `protobuf:"bytes,4,opt,name=room_url,json=roomUrl,proto3" json:"room_url,omitempty"` ShowStatus ShowStatus `protobuf:"varint,5,opt,name=show_status,json=showStatus,proto3,enum=douyu.ShowStatus" json:"show_status,omitempty"` VideoLoop VideoLoopStatus `protobuf:"varint,6,opt,name=videoLoop,proto3,enum=douyu.VideoLoopStatus" json:"videoLoop,omitempty"` Avatar *Avatar `protobuf:"bytes,7,opt,name=avatar,proto3" json:"avatar,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Room) Descriptor ¶
func (*Room) GetNickname ¶
func (*Room) GetRoomName ¶
func (*Room) GetRoomUrl ¶
func (*Room) GetShowStatus ¶
func (m *Room) GetShowStatus() ShowStatus
func (*Room) GetVideoLoop ¶
func (m *Room) GetVideoLoop() VideoLoopStatus
func (*Room) ProtoMessage ¶
func (*Room) ProtoMessage()
func (*Room) XXX_DiscardUnknown ¶
func (m *Room) XXX_DiscardUnknown()
func (*Room) XXX_Unmarshal ¶
type ShowStatus ¶
type ShowStatus int32
const ( ShowStatus_Unknown ShowStatus = 0 ShowStatus_Living ShowStatus = 1 ShowStatus_NoLiving ShowStatus = 2 )
func (ShowStatus) EnumDescriptor ¶
func (ShowStatus) EnumDescriptor() ([]byte, []int)
func (ShowStatus) String ¶
func (x ShowStatus) String() string
type StateManager ¶
type StateManager struct { *concern_manager.StateManager // contains filtered or unexported fields }
func NewStateManager ¶
func NewStateManager() *StateManager
func (*StateManager) AddLiveInfo ¶
func (c *StateManager) AddLiveInfo(liveInfo *LiveInfo) error
func (StateManager) CurrentLiveKey ¶
func (l StateManager) CurrentLiveKey(keys ...interface{}) string
func (*StateManager) GetLiveInfo ¶
func (c *StateManager) GetLiveInfo(id int64) (*LiveInfo, error)
func (*StateManager) Start ¶
func (c *StateManager) Start() error
type VideoLoopStatus ¶
type VideoLoopStatus int32
const ( VideoLoopStatus_Off VideoLoopStatus = 0 VideoLoopStatus_On VideoLoopStatus = 1 )
func (VideoLoopStatus) EnumDescriptor ¶
func (VideoLoopStatus) EnumDescriptor() ([]byte, []int)
func (VideoLoopStatus) String ¶
func (x VideoLoopStatus) String() string
Click to show internal directories.
Click to hide internal directories.