Documentation ¶
Index ¶
- Variables
- func IncrDMNum(ctx context.Context, rid int64, mode int64)
- func InitAPI()
- func InitDatabus(c *conf.Config)
- func InitGrpc(c *conf.Config)
- func InitIPdb()
- func InitLancer(c *conf.Config)
- func InitTitan()
- func SendBNDatabus(ctx context.Context, uid int64, info *model.BNDatabus)
- func SendBroadCast(ctx context.Context, sm string, rid int64) error
- func SendBroadCastGrpc(ctx context.Context, sm string, rid int64) error
- type CommentTitle
- type DMConf
- type Dao
- func (d *Dao) Close()
- func (d *Dao) GetHistoryData(ctx context.Context, roomid int64) (result map[string][]string, err error)
- func (d *Dao) IsWhietListUID(ctx context.Context, key string) (isWhite bool)
- func (d *Dao) Ping(c context.Context) error
- func (d *Dao) SaveHistory(ctx context.Context, hm string, adm bool, rid int64)
- type FansMedalInfo
- func (f *FansMedalInfo) GetFansMedal(ctx context.Context, uid int64) error
- func (f *FansMedalInfo) GetMedalRoomid(ctx context.Context, uid int64) error
- func (f *FansMedalInfo) GetMedalanchorName(ctx context.Context, uid int64) error
- func (f *FansMedalInfo) GetSpeicalMedal(ctx context.Context, uid int64, rid int64) error
- type LimitCheckInfo
- type LimitConf
- type RoomConf
- type UserBindInfo
- type UserInfo
- func (u *UserInfo) Get(ctx context.Context, uid int64) error
- func (u *UserInfo) GetPrivilegeType(ctx context.Context, uid int64, ruid int64) error
- func (u *UserInfo) GetUnameColor(ctx context.Context, uid int64, rid int64) error
- func (u *UserInfo) GetUserBubble(ctx context.Context, uid int64, roomid int64, bubble int64, guardLevel int) error
- func (u *UserInfo) GetUserLevelRank(ctx context.Context, uid int64) error
- func (u *UserInfo) GetVipInfo(ctx context.Context, uid int64) error
- func (u *UserInfo) IsRoomAdmin(ctx context.Context, uid int64, roomid int64) error
- type UserScore
Constants ¶
This section is empty.
Variables ¶
View Source
var ( //InfocDMSend 弹幕发送成功上报 InfocDMSend *infoc.Infoc //InfocDMErr 弹幕发送失败上报 InfocDMErr *infoc.Infoc )
View Source
var ( //FilterClient 屏蔽词过滤 FilterClient filterService.FilterClient //LcClient 地理区域信息 LcClient locationService.LocationClient //SpyClient 用户真实分 SpyClient spyService.SpyClient //BcastClient 弹幕推送 BcastClient *broadcasrtService.Client )
View Source
var ( //IP4db ip4地址库 IP4db *ipdb.City //IP6db ip6地址库 IP6db *ipdb.City )
View Source
var ( // BannedServiceClient liveRpc banner_service api BannedServiceClient *bannedService.Client // RoomServiceClient liveRpc room service api RoomServiceClient *roomService.Client // LiveUserServiceClient liveRpc liveUser service api LiveUserServiceClient *liveUserService.Client // AvServiceClient liveRpc av service api AvServiceClient *avService.Client //FansMedalServiceClient liverpc fansmedal service api FansMedalServiceClient *fansMedalService.Client //ActivityServiceClient liverpc activity service api ActivityServiceClient *activityService.Client //RcServiceClient liverpc rc service api RcServiceClient *rcService.Client //RankdbServiceClient liverpc rankdb service api RankdbServiceClient *rankdbService.Client //UserExtServiceClient liverpc userext service api UserExtServiceClient *userextService.Client //LiveBroadCastClient liverpc thirdApi LiveBroadCastClient *liveBroadCast.Client )
Functions ¶
func SendBNDatabus ¶
SendBNDatabus 拜年祭制定房间投递到databus
func SendBroadCast ¶
SendBroadCast 发送弹幕(http)
Types ¶
type CommentTitle ¶
CommentTitle 头衔信息
func (*CommentTitle) GetCommentTitle ¶
func (c *CommentTitle) GetCommentTitle(ctx context.Context) error
GetCommentTitle 获取头衔
type Dao ¶
Dao dao
func (*Dao) GetHistoryData ¶
func (d *Dao) GetHistoryData(ctx context.Context, roomid int64) (result map[string][]string, err error)
GetHistoryData 获取历史数据
func (*Dao) IsWhietListUID ¶
IsWhietListUID 通过UID判读是否是白名单用户
type FansMedalInfo ¶
type FansMedalInfo struct { MedalID int64 RUID int64 RUName string MedalLevel int64 MedalName string AnchorName string RoomID int64 MColor int64 SpecialMedal string // contains filtered or unexported fields }
FansMedalInfo 粉丝勋章信息
func (*FansMedalInfo) GetFansMedal ¶
func (f *FansMedalInfo) GetFansMedal(ctx context.Context, uid int64) error
GetFansMedal 获取主播的粉丝勋章信息
func (*FansMedalInfo) GetMedalRoomid ¶
func (f *FansMedalInfo) GetMedalRoomid(ctx context.Context, uid int64) error
GetMedalRoomid 获取勋章对应主播的房间
func (*FansMedalInfo) GetMedalanchorName ¶
func (f *FansMedalInfo) GetMedalanchorName(ctx context.Context, uid int64) error
GetMedalanchorName 获取勋章对应主播的昵称
func (*FansMedalInfo) GetSpeicalMedal ¶
GetSpeicalMedal 获取特殊勋章
type LimitCheckInfo ¶
type LimitCheckInfo struct { UID int64 RoomID int64 Msg string MsgType int64 Dao *Dao Conf *LimitConf }
LimitCheckInfo 频率限制检查参数
func (*LimitCheckInfo) LimitPerSec ¶
func (l *LimitCheckInfo) LimitPerSec(ctx context.Context) error
LimitPerSec 每秒发言限制
func (*LimitCheckInfo) LimitRoomPerSecond ¶
func (l *LimitCheckInfo) LimitRoomPerSecond(ctx context.Context) error
LimitRoomPerSecond 单房间每秒只能发送制定条数弹幕
func (*LimitCheckInfo) LimitSameMsg ¶
func (l *LimitCheckInfo) LimitSameMsg(ctx context.Context) error
LimitSameMsg 同一个用户同一房间5s 只能发送一条相同弹幕
type LimitConf ¶
type LimitConf struct { AreaLimit bool `json:"areaLimit"` AllUserLimit bool `json:"AllUserLimit"` LevelLimitStatus bool `json:"LevelLimitStatus"` LevelLimit int64 `json:"LevelLimit"` RealName bool `json:"RealName"` PhoneLimit bool `json:"PhoneLimit"` MsgLength int `json:"MsgLength"` DmNum int64 `json:"DmNum"` DMPercent int64 `json:"DMPercent"` DMwhitelist bool `json:"DMwhitelist"` DMwhitelistID string `json:"DMwhitelistID"` }
LimitConf 弹幕限制配置
type UserBindInfo ¶
UserBindInfo 用户手机,实名等信息
type UserInfo ¶
type UserInfo struct { Vip int Svip int UserLever int64 UserScore int64 ULevelRank int64 ULevelColor int64 UnameColor string RoomAdmin bool PrivilegeType int Bubble int64 MedalInfo *FansMedalInfo // contains filtered or unexported fields }
UserInfo 用户等级,经验等信息
func (*UserInfo) GetPrivilegeType ¶
GetPrivilegeType 获取大航海信息
func (*UserInfo) GetUnameColor ¶
GetUnameColor 获取用户的昵称颜色
func (*UserInfo) GetUserBubble ¶
func (u *UserInfo) GetUserBubble(ctx context.Context, uid int64, roomid int64, bubble int64, guardLevel int) error
GetUserBubble 判断用户是否有气泡
func (*UserInfo) GetUserLevelRank ¶
GetUserLevelRank 获取用户等级RANK
func (*UserInfo) GetVipInfo ¶
GetVipInfo 获取用户的老爷等级
Click to show internal directories.
Click to hide internal directories.