wproto

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2020 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MsgEntryResp

type MsgEntryResp struct {
	MessageType  string `json:"messageType"`
	BusinessData struct {
		Code       int              `json:"code"`
		Message    string           `json:"message"`
		ResultData MsgEntryRespData `json:"resultData"`
	} `json:"businessData"`
}

type MsgEntryRespData

type MsgEntryRespData struct {
	UserName                     string `json:"userName"`
	UserID                       string `json:"userId"`
	Role                         string `json:"role"`     // 字段是判断用户角色的,包括主播、用户、房管、超管,主要是用来对用户进行相关操作
	UserRole                     string `json:"userRole"` // 判断当前用户是主播还是用户,主要是用来区分用户名片的,是显示主播名片还是用户名片
	Sex                          string `json:"sex"`
	Avatar                       string `json:"avatar"`
	ExpGrade                     int    `json:"expGrade"`
	GuardType                    string `json:"guardType"`
	CarID                        string `json:"carId"`
	CarName                      string `json:"carName"`
	CarIcon                      string `json:"carIcon"`
	CarOnlineURL                 string `json:"carOnlineUrl"`
	CarResURL                    string `json:"carResUrl"`
	IsPlayCarAnim                string `json:"isPlayCarAnim"`
	NobilityType                 int    `json:"nobilityType"`
	IsEnterHide                  int
	IsPlayNobilityEnterAnimation string `json:"isPlayNobilityEnterAnimation"` //是否播放贵族入场动画
	IsWeekStar                   int    `json:"isWeekStar"`                   //是否展示周星标识

	//加属性,用于渠道方app,用户详情跳转
	AppID    string   `json:"appId"`
	OpenID   string   `json:"openId"`
	MarkUrls []string `json:"markUrls"`
}

非普通用户

type MsgEntryWsReq

type MsgEntryWsReq struct {
	SdkVersion         string `json:"sdkVersion"`
	AppID              string `json:"appId"`
	LiveAppID          string `json:"liveAppId"`
	SessionID          string `json:"sessionId"`
	IsReconnect        string `json:"isReconnect"`
	UserID             string `json:"userId"`
	OpenID             string `json:"openId"`
	Avatar             string `json:"avatar"`
	UserName           string `json:"userName"`
	Sex                string `json:"sex"`
	Role               string `json:"role"`     // 字段是判断用户角色的,包括主播、用户、房管、超管,主要是用来对用户进行相关操作
	UserRole           string `json:"userRole"` // 判断当前用户是主播还是用户,主要是用来区分用户名片的,是显示主播名片还是用户名片
	ExpGrade           int    `json:"expGrade"`
	GuardType          string `json:"guardType"`
	CarID              string `json:"carId"`
	CarName            string `json:"carName"`
	CarIcon            string `json:"carIcon"`
	CarOnlineURL       string `json:"carOnlineUrl"`
	CarResURL          string `json:"carResUrl"`
	IsPlayCarAnim      string `json:"isPlayCarAnim"`
	MarkUrlsJoinString string `json:"markUrlsJoinString"`
	NobilityType       int    `json:"nobilityType"`
	IsEnterHide        int    `json:"isEnterHide"`
	TokenType          string `json:"tokenType"`
	Reconnect          bool   `json:"reconnect"`
	Hide               bool   `json:"hide"`
	PushSide           bool   `json:"pushSide"`
	Nobility           bool   `json:"nobility"`
	Guard              bool   `json:"guard"`
	LiveID             string `json:"liveId"`
	EnterType          string `json:"enterType"`
	Login              bool   `json:"login"`
	PullSide           bool   `json:"pullSide"`
	RoomManager        bool   `json:"roomManager"`
	Vip                bool   `json:"vip"`
	NotHide            bool   `json:"notHide"`

	IsPlayNobilityEnterAnimation int `json:"isPlayNobilityEnterAnimation"` //是否播放贵族入场动画
	IsWeekStar                   int `json:"isWeekStar"`                   //是否展示周星标识
	IsdOrdinary                  int `json:"isdOrdinary"`                  //是否是普通用户(无任何特权和身份,区别在于只广播等级和昵称,显示在入场消息最先面滚动区域)
}

ws to kafka

type MsgGiftReq

type MsgGiftReq struct {
	MessageType  string         `json:"messageType"`
	BusinessData MsgGiftReqData `json:"businessData"`
	R            string         `json:"r"`
	T            string         `json:"t"`
	S            string         `json:"s"`
}

type MsgGiftReqData

type MsgGiftReqData struct {
	GiftCostType string `json:"giftCostType"` // 礼物消费类型 1人民币,2积分
	MarkID       string `json:"markId"`       // 礼物的markId
	GiftName     string `json:"giftName"`     // 礼物名字
	Sex          string `json:"sex"`
	BoxType      string `json:"boxType"`
	Avatar       string `json:"avatar"`
	AnchorID     string `json:"anchorId"`
	IsStarGift   string `json:"isStarGift"`
	AnchorName   string `json:"anchorName"`
	UUID         string `json:"uuid"`       // 全局唯一标识
	EffectType   string `json:"effectType"` //礼物特效类型 1:静态,2:动态
	LiveCount    string `json:"liveCount"`  // 直播场次
	CreateTime   string `json:"createTime"` // 礼物发送时间
	Price        string `json:"price"`      // 礼物价格
	AppID        string `json:"appId"`
	ClientIP     string `json:"clientIp"`
	GiftNum      string `json:"giftNum"` // 礼物数量
	GuardType    string `json:"guardType"`
	FollowStatus int    `json:"followStatus"` // 1关注 0未关注
}
{
        "giftCostType": "1",
        "markId": "97",
        "giftName": "礼物批量赠送66",
        "sex": "1",
        "boxType": "1",
        "avatar": "http://imgdown.fangqie666.com:9327/img///5/91a263efdbcb74fea94548e66e98762a_s1.jpg",
        "anchorId": "1ed8bfc1-324f-4834-8065-d3fad9943f88",
        "isStarGift": "0",
        "anchorName": "安卓用户123",
        "uuid": "2d4bf89e-f208-4259-bd6b-a8ae0c48238c",
        "effectType": "2",
        "liveCount": "0",
        "createTime": "1593661373572",
        "price": "100",
        "appId": "201",
        "clientIp": "10.0.3.15",
        "giftNum": "1",
        "guardType": "0"
    }

client to ws

type MsgGiftWsReq

type MsgGiftWsReq struct {
	R            string           `json:"r"`
	S            string           `json:"s"`
	MessageType  string           `json:"messageType"`
	T            string           `json:"t"`
	BusinessData MsgGiftWsReqData `json:"businessData"`
}

type MsgGiftWsReqData

type MsgGiftWsReqData struct {
	GiftCostType string `json:"giftCostType"`
	Role         string `json:"role"`
	MarkID       string `json:"markId"`
	ExpGrade     string `json:"expGrade"`
	GiftName     string `json:"giftName"`
	Sex          string `json:"sex"`
	Ks           string `json:"ks"`
	BoxType      string `json:"boxType"`
	Avatar       string `json:"avatar"`
	AnchorID     string `json:"anchorId"`
	IsStarGift   string `json:"isStarGift"`
	UserName     string `json:"userName"`
	AnchorName   string `json:"anchorName"`
	UUID         string `json:"uuid"`
	UserID       string `json:"userId"`
	LiveID       string `json:"liveId"`
	EffectType   string `json:"effectType"`
	LiveCount    string `json:"liveCount"`
	CreateTime   string `json:"createTime"`
	Price        string `json:"price"`
	AppID        string `json:"appId"`
	ClientIP     string `json:"clientIp"`
	GiftNum      string `json:"giftNum"`
	GuardType    string `json:"guardType"`
	FollowStatus int    `json:"followStatus"`
}

ws to gift

type MsgLeaveReq

type MsgLeaveReq struct {
	MessageType  string          `json:"messageType"`
	BusinessData MsgLeaveReqData `json:"businessData"`
	R            string          `json:"r"`
	T            string          `json:"t"`
	S            string          `json:"s"`
}

type MsgLeaveReqData

type MsgLeaveReqData struct {
}

client to ws

type MsgLeaveResp

type MsgLeaveResp struct {
	MessageType  string `json:"messageType"`
	BusinessData struct {
		Code       int              `json:"code"`
		Message    string           `json:"message"`
		ResultData MsgLeaveRespData `json:"resultData"`
	} `json:"businessData"`
}

type MsgLeaveRespData

type MsgLeaveRespData struct {
	UserID string `json:"userId"`
	Role   string `json:"role"`
	// StreamName   string `json:"streamName"`
	LastLiveData struct {
		StartTime     int64  `json:"startTime"`
		EndTime       int64  `json:"endTime"`
		Herald        string `json:"herald"`
		PublishTime   string `json:"publishTime"`
		MaxPopularity string `json:"maxPopularity"`
	} `json:"lastLiveData"`
}

ws to client

type MsgLeaveReturnValue

type MsgLeaveReturnValue struct {
	Role         string `json:"role"`
	UserID       string `json:"userId"`
	LastLiveData struct {
		StartTime     int64  `json:"startTime"`
		EndTime       int64  `json:"endTime"`
		Herald        string `json:"herald"`
		PublishTime   string `json:"publishTime"`
		MaxPopularity int    `json:"maxPopularity"`
		NobilityType  int    `json:"nobilityType"`
		OpenID        string `json:"openId"`
		AppID         string `json:"appId"`
	} `json:"lastLiveData"`
}

kafka to ws

type MsgLeaveReturnValueBulk

type MsgLeaveReturnValueBulk struct {
	MsgLeaveReturnValueBulkData []MsgLeaveReturnValueBulkData
}

type MsgLeaveReturnValueBulkData

type MsgLeaveReturnValueBulkData struct {
	MessageType string              `json:"messageType"`
	ScopeType   int                 `json:"scopeType"`
	ScopeID     string              `json:"scopeId"`
	Text        MsgLeaveReturnValue `json:"text"`
}

type MsgLeaveWsReq

type MsgLeaveWsReq struct {
	R            string            `json:"r"`
	S            string            `json:"s"`
	MessageType  string            `json:"messageType"`
	T            string            `json:"t"`
	BusinessData MsgLeaveWsReqData `json:"businessData"`
}

type MsgLeaveWsReqData

type MsgLeaveWsReqData struct {
	LiveID    string `json:"liveId"`
	Role      string `json:"role"`
	ExpGrade  int    `json:"expGrade"`
	GuardType string `json:"guardType"`
	UserName  string `json:"userName"`
	Avatar    string `json:"avatar"`
	ClientIP  string `json:"clientIp"`
	KS        int64  `json:"ks"` // 当前时间戳秒数
}

ws to kafka

type MsgOrdinaryEntryResp

type MsgOrdinaryEntryResp struct {
	MessageType  string `json:"messageType"`
	BusinessData struct {
		Code       int                      `json:"code"`
		Message    string                   `json:"message"`
		ResultData MsgOrdinaryEntryRespData `json:"resultData"`
	} `json:"businessData"`
}

type MsgOrdinaryEntryRespData

type MsgOrdinaryEntryRespData struct {
	UserName string `json:"userName"`
	ExpGrade int    `json:"expGrade"`
}

ws to client 普通用户

type PostBody

type PostBody struct {
	SessionID string `json:"sessionId"`
	Message   string `json:"message"`
}

post data to gift

Jump to

Keyboard shortcuts

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