relation

package
v0.0.0-...-83adff0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 6, 2020 License: GPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AppFilterDefault implementation
	// 默认排序
	AppFilterDefault = 0
	// AppFilterFansMedal implementation
	// 只看我有粉丝勋章的
	AppFilterFansMedal = 1
	// AppFilterGoldType implementation
	// 按照金瓜子排序
	AppFilterGoldType = 2
)
View Source
const (
	// AppSortDefaultT ...
	// 默认排序
	AppSortDefaultT = 0
	// AppSortRuleLiveTimeT ...
	// 开播时间倒序
	AppSortRuleLiveTimeT = 1
	// AppSortRuleOnlineT ...
	// 人气值倒序
	AppSortRuleOnlineT = 2
	// AppSortRuleGoldT ...
	// 金瓜子倒序
	AppSortRuleGoldT = 3
)
View Source
const (

	// AccountGRPC ...
	// 主站grpc用户信息
	AccountGRPC = "Cards3"
	// LiveUserExpGRPC ...
	// 直播用户经验grpc
	LiveUserExpGRPC = "xuserExp"
	// FansNum ...
	// 直播粉丝
	FansNum = "GetUserFcBatch"
	// LiveDomain implementation
	// 域名
	LiveDomain = "http://live.bilibili.com/"
	// BoastURL implementation
	// 秒开url
	BoastURL = "?broadcast_type="

	// GoRoutingErr ...
	// 协程wait错误
	GoRoutingErr = "协程等待数据错误"
	// App533CardType implementation
	// 大卡类型
	App533CardType = 1
	// PendentMobileBadge implementation
	// 角标类型
	PendentMobileBadge = "mobile_index_badge"
	// PendentPosition implementation
	// 角标位置
	PendentPosition = 2
	// App531GrayRule implementation
	// 灰度策略
	App531GrayRule = "r_big_card"
	// App536GrayRule implementation
	// 灰度策略
	App536GrayRule = "r_homepage_card536"
	// SelfUID implementation
	// 调试UID
	SelfUID = 22973824
	// DummyUIDEnable implementation
	// 调试开
	DummyUIDEnable = 1
)

Variables

This section is empty.

Functions

func App531ABTest

func App531ABTest(ctx context.Context, content string, build string, platform string) (grayType int64)

App531ABTest ... ABTest

func AppFilterGold

func AppFilterGold(ctx context.Context, originResult *v1pb.LiveAnchorResp) (resp []*v1pb.LiveAnchorResp_Rooms, err error)

AppFilterGold implementation [app端关注二级页]过滤送礼

func AppFilterRuleFansMedal

func AppFilterRuleFansMedal(ctx context.Context, originResult *v1pb.LiveAnchorResp, targetUIDs []int64) (resp []*v1pb.LiveAnchorResp_Rooms, err error)

AppFilterRuleFansMedal implementation [app端关注二级页]过滤粉丝勋章

func AppSortRuleGold

func AppSortRuleGold(ctx context.Context, originResult *v1pb.LiveAnchorResp) (resp []*v1pb.LiveAnchorResp_Rooms)

AppSortRuleGold implementation [app端关注二级页]按照送礼排序

func AppSortRuleLiveTime

func AppSortRuleLiveTime(originResult *v1pb.LiveAnchorResp) (resp []*v1pb.LiveAnchorResp_Rooms)

AppSortRuleLiveTime implementation [app端关注二级页]按照开播时间排序

func AppSortRuleOnline

func AppSortRuleOnline(originResult *v1pb.LiveAnchorResp) (resp []*v1pb.LiveAnchorResp_Rooms)

AppSortRuleOnline implementation [app端关注二级页]按照人气值排序

func GetChunkInfo

func GetChunkInfo(rpcName string) (rpcChunkSize int64, RPCTimeout int64, err error)

GetChunkInfo ... 获取分块信息

func GetFansMedal

func GetFansMedal(ctx context.Context, req *fansMedalV1.FansMedalTargetsWithMedalReq) (fansResult map[int64]bool, err error)

GetFansMedal ... 获取粉丝勋章佩戴信息

func GetGiftInfo

func GetGiftInfo(ctx context.Context) (giftInfo map[int64]int64, err error)

GetGiftInfo ... 获取送礼信息

func GetGrayRule

func GetGrayRule(ctx context.Context, req *userExV1.GrayRuleGetByMarkReq) (extResult *userExV1.GrayRuleGetByMarkResp_Data, err error)

GetGrayRule ... 获取灰度规则信息

func GetLastLiveTime

func GetLastLiveTime(ctx context.Context, rolaids []int64) (literature map[string]string, err error)

GetLastLiveTime ... 获取Record信息

func GetPkID

func GetPkID(ctx context.Context, req *avV1.PkGetPkIdsByRoomIdsReq) (avResult map[string]int64, err error)

GetPkID ... 获取PkId信息

func GetRoomInfo

GetRoomInfo ... 获取room信息

func GetRoomNewsInfo

func GetRoomNewsInfo(ctx context.Context, rolaids *roomExV1.RoomNewsMultiGetReq) (roomNewsResult map[int64]*roomExV1.RoomNewsMultiGetResp_Data, err error)

GetRoomNewsInfo ... 获取公告信息

func GetRoomPendantInfo

func GetRoomPendantInfo(ctx context.Context, req *roomV1.RoomPendantGetPendantByIdsReq) (roomNewsResult map[int64]*roomV1.RoomPendantGetPendantByIdsResp_Result, err error)

GetRoomPendantInfo ... 获取角标信息

func GetUIDFromHeader

func GetUIDFromHeader(ctx context.Context) (uid int64)

GetUIDFromHeader ... 获取uid

func RParseInt

func RParseInt(inputStr string, defaultValue int64) (output int64)

RParseInt ... 转int

func RoleMap

func RoleMap(role int8) (changeType int64)

func UIDs2roomIDs

func UIDs2roomIDs(ctx context.Context, ufos []int64) (rolaids map[int64]int64, err error)

UIDs2roomIDs ... uid转换roomID,每批最大400

Types

type ChunkCallInfo

type ChunkCallInfo struct {
	ParamsName string
	URLName    string
	ChunkSize  int64
	ChunkNum   int64
	RPCTimeout int64
}

ChunkCallInfo ... 日志结构体

type ErrLogStrut

type ErrLogStrut struct {
	Code       int64
	Msg        string
	ErrDesc    string
	ErrType    string
	URLName    string
	RPCTimeout int64
	ChunkSize  int64
	ChunkNum   int64
	ErrorPtr   *error
}

ErrLogStrut ... 自定义ErrLog结构

func CheckReturn

func CheckReturn(err error, code int64, msg string, urlName string,
	rpcTimeout int64, chunkSize int64, chunkNum int64) (errLog *ErrLogStrut, success bool)

CheckReturn ... 检查返回

type Gray

type Gray struct {
	Key   string
	Value int
}

Gray ... 自定义灰度策略结构

type GrayList

type GrayList []Gray

GrayList ... 自定义灰度策略

func SortMapByValue

func SortMapByValue(m map[string]int) GrayList

SortMapByValue ... 自定义排序

func (GrayList) Len

func (p GrayList) Len() int

Len 自定义排序

func (GrayList) Less

func (p GrayList) Less(i, j int) bool

Less 自定义排序

func (GrayList) Swap

func (p GrayList) Swap(i, j int)

Swap 自定义排序

type GrayRule

type GrayRule struct {
	Name  string `json:"name"`
	Mark  string `json:"mark"`
	Value string `json:"value"`
}

GrayRule ... 自定义灰度策略

type Pair

type Pair struct {
	Key   int64
	Value int64
}

Pair ... 自定义map排序结构

type PairList

type PairList []Pair

PairList ... 自定义灰度策略

func SortMap

func SortMap(input map[int64]int64) (sorted PairList)

SortMap ... 自定义排序

func (PairList) Len

func (p PairList) Len() int

Len 自定义排序

func (PairList) Less

func (p PairList) Less(i, j int) bool

Less 自定义排序

func (PairList) Swap

func (p PairList) Swap(i, j int)

Swap 自定义排序

type SendGift

type SendGift struct {
	Mid int64
	// contains filtered or unexported fields
}

SendGift ... [app端关注二级页]按照金瓜子排序结构

type SortLiveTime

type SortLiveTime []*v1pb.LiveAnchorResp_Rooms

SortLiveTime ... implementation [app端关注二级页]按照开播时间排序

func (SortLiveTime) Len

func (p SortLiveTime) Len() int

AppSortRuleLiveTime implementation [app端关注二级页]按照开播时间排序

func (SortLiveTime) Less

func (p SortLiveTime) Less(i, j int) bool

AppSortRuleLiveTime implementation [app端关注二级页]按照开播时间排序

func (SortLiveTime) Swap

func (p SortLiveTime) Swap(i, j int)

AppSortRuleLiveTime implementation [app端关注二级页]按照开播时间排序

type SortOnlineTime

type SortOnlineTime []*v1pb.LiveAnchorResp_Rooms

SortOnlineTime ... implementation [app端关注二级页]按照开播时间排序

func (SortOnlineTime) Len

func (p SortOnlineTime) Len() int

AppSortRuleLiveTime implementation [app端关注二级页]按照开播时间排序

func (SortOnlineTime) Less

func (p SortOnlineTime) Less(i, j int) bool

AppSortRuleLiveTime implementation [app端关注二级页]按照开播时间排序

func (SortOnlineTime) Swap

func (p SortOnlineTime) Swap(i, j int)

AppSortRuleLiveTime implementation [app端关注二级页]按照开播时间排序

type SortUIDGift

type SortUIDGift []SendGift

SortUIDGift ... implementation [app端关注二级页]按照开播时间排序

func (SortUIDGift) Len

func (p SortUIDGift) Len() int

Len [app端关注二级页]自定义排序结构

func (SortUIDGift) Less

func (p SortUIDGift) Less(i, j int) bool

Less [app端关注二级页]自定义排序结构

func (SortUIDGift) Swap

func (p SortUIDGift) Swap(i, j int)

Swap [app端关注二级页]自定义排序结构

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL