live

package
v0.0.0-...-082c262 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ROLE_ERR_MSG = map[int]string{
	400001: "微信号不合规",
	400002: "微信号需要实名认证",
	400003: "添加角色达到上限",
	400004: "重复添加角色",
	400005: " 主播角色删除失败,该主播存在未开播的直播间",
}

Functions

This section is empty.

Types

type AddGoodsRes

type AddGoodsRes struct {
	util.CommonError
}

type DelLiveRoomRes

type DelLiveRoomRes struct {
	util.CommonError
}

type Goods

type Goods struct {
	CoverImg string `json:"cover_img"`
	Url      string `json:"url"`
	Price    int    `json:"price"`
	Name     string `json:"name"`
}

type GoodsAuditRes

type GoodsAuditRes struct {
	util.CommonError
	AuditId int `json:"auditId"`
}

type GoodsInfo

type GoodsInfo struct {
	CoverImgUrl string `json:"coverImgUrl"`

	Name      string  `json:"name"`
	PriceType int     `json:"priceType"`
	Price     float64 `json:"price"`
	Price2    float64 `json:"price2"`

	Url     string `json:"url"`
	GoodsId string `json:"goodsId"`
}

type GoodsInfoRequest

type GoodsInfoRequest struct {
	GoodsInfo GoodsInfo `json:"goodsInfo"`
}

type GoodsInfoRes

type GoodsInfoRes struct {
	util.CommonError

	GoodsId string `json:"goodsId"`
	AuditId int    `json:"auditId"`
}

type GoodsListRes

type GoodsListRes struct {
	util.CommonError

	Goods []GoodsWare2 `json:"goods"`
	Total int          `json:"total"`
}

type GoodsWare

type GoodsWare struct {
	CoverImgUrl string `json:"cover_img_url"`

	Name      string  `json:"name"`
	PriceType int     `json:"priceType"`
	Price     float64 `json:"price"`
	Price2    float64 `json:"price2"`

	Url             string `json:"url"`
	GoodsId         int    `json:"goods_id"`
	AuditStatus     int    `json:"audit_status"`
	Third_party_tag int    `json:"third_party_tag"`
}

type GoodsWare2

type GoodsWare2 struct {
	CoverImgUrl string `json:"coverImgUrl"`

	Name      string  `json:"name"`
	PriceType int     `json:"priceType"`
	Price     float64 `json:"price"`
	Price2    float64 `json:"price2"`

	Url     string `json:"url"`
	GoodsId int    `json:"goods_id"`

	Third_party_tag int `json:"thirdPartyTag"`
	// contains filtered or unexported fields
}

type GoodswarehouseRes

type GoodswarehouseRes struct {
	util.CommonError

	Goods []GoodsWare `json:"goods"`
	Total int         `json:"total"`
}

type LiveAnchor

type LiveAnchor struct {
	*context.Context
}

主播管理

func NewLiveAnchor

func NewLiveAnchor(context *context.Context) *LiveAnchor

func (*LiveAnchor) AddRole

func (this *LiveAnchor) AddRole(req *RoleReq) (int, error)

func (*LiveAnchor) DelRole

func (this *LiveAnchor) DelRole(req *RoleReq) (int, error)

func (*LiveAnchor) QueryRoleList

func (this *LiveAnchor) QueryRoleList(req *RoleListReq) (*RoleListRes, error)

type LiveGoodsMgr

type LiveGoodsMgr struct {
	*context.Context
}

直播间商品管理

func NewLiveGoodsMgr

func NewLiveGoodsMgr(context *context.Context) *LiveGoodsMgr

init

func (*LiveGoodsMgr) GetGoodswarehouse

func (this *LiveGoodsMgr) GetGoodswarehouse(goods_ids []int) (res GoodswarehouseRes, err error)

调用额度:1000次/一天

func (*LiveGoodsMgr) Getapproved

func (this *LiveGoodsMgr) Getapproved(offset int, limit int, status int) (res GoodsListRes, err error)

调用额度:10000次/一天

func (*LiveGoodsMgr) GoodsAdd

func (this *LiveGoodsMgr) GoodsAdd(req GoodsInfoRequest) (res GoodsInfoRes, err error)

调用频率 调用额度:500次/一天

func (*LiveGoodsMgr) GoodsAudit

func (this *LiveGoodsMgr) GoodsAudit(goodsId int) (res util.CommonError, err error)

调用频率 调用额度:500次/一天

func (*LiveGoodsMgr) GoodsDelete

func (this *LiveGoodsMgr) GoodsDelete(goodsId int) (res util.CommonError, err error)

调用频率 调用额度:500次/一天

func (*LiveGoodsMgr) GoodsResetaudit

func (this *LiveGoodsMgr) GoodsResetaudit(audit int, goodsId int) (res util.CommonError, err error)

调用频率 调用额度:500次/一天

func (*LiveGoodsMgr) GoodsUpdate

func (this *LiveGoodsMgr) GoodsUpdate(goodsInfo GoodsInfo) (res util.CommonError, err error)

调用额度:1000次/一天

type LiveReplay

type LiveReplay struct {
	ExpireTime string `json:"expire_time"`
	CreateTime string `json:"create_time"`
	MediaUrl   string `json:"media_url"`
}

type LiveRoom

type LiveRoom struct {
	*context.Context
}

直播间管理

func NewLiveRoom

func NewLiveRoom(context *context.Context) *LiveRoom

init

func (*LiveRoom) AddGoods

func (this *LiveRoom) AddGoods(ids []int, room_id int) (res AddGoodsRes, err error)

func (*LiveRoom) CreateLiveRoom

func (this *LiveRoom) CreateLiveRoom(room Room) (res RoomRes, err error)

请求方式 POST

func (*LiveRoom) DelLiveRoom

func (this *LiveRoom) DelLiveRoom(id int64) (res DelLiveRoomRes, err error)

func (*LiveRoom) GetLiveinfoList

func (this *LiveRoom) GetLiveinfoList(start, limit int) (res RoomInfoRes, err error)

请求方式 POST

func (*LiveRoom) GetLiveinfoReplayList

func (this *LiveRoom) GetLiveinfoReplayList(start, limit int, room_id int) (res RoomReplayRes, err error)

type RoleList

type RoleList struct {
	Headingimg      string `json:"headingimg" form:"headingimg"`
	Nickname        string `json:"nickname" form:"nickname"`
	Openid          string `json:"openid" from:"openid"`
	UpdateTimestamp []int  `json:"updateTimestamp" form:"updateTimestamp"`
	Username        string `json:"username" form:"username"`
}

type RoleListReq

type RoleListReq struct {
	Role    int    `json:"role" form:"role"`
	Offset  int    `json:"offset" form:"offset"`
	Limit   int    `json:"limit" form:"limit"`
	Keyword string `json:"keyword" form:"keyword"`
}

type RoleListRes

type RoleListRes struct {
	Errcode int        `json:"errcode" form:"errcode"`
	Total   int        `json:"total" form:"total"`
	List    []RoleList `json:"list" form:"list"`
}

type RoleReq

type RoleReq struct {
	Username string `json:"username" form:"username"`
	Role     int    `json:"role" form:"role"`
}

type RoleRes

type RoleRes struct {
	Errcode int `json:"errcode" form:"errcode"`
}

type Room

type Room struct {
	Name            string `json:"name"`
	CoverImg        string `json:"coverImg"`
	FeedsImg        string `json:"feedsImg"`
	StartTime       int64  `json:"startTime"`
	EndTime         int64  `json:"endTime"`
	AnchorName      string `json:"anchorName"`
	AnchorWechat    string `json:"anchorWechat"`
	SubAnchorWechat string `json:"subAnchorWechat"`
	ShareImg        string `json:"shareImg"`
	Type            int    `json:"type"`
	ScreenType      int    `json:"screenType"`
	CloseLike       int    `json:"closeLike"`
	CloseGoods      int    `json:"closeGoods"`
	CloseComment    int    `json:"closeComment"`
	CloseReplay     int    `json:"closeReplay"`
	CloseShare      int    `json:"closeShare"`
	CloseKf         int    `json:"closeKf"`
}

type RoomInfo

type RoomInfo struct {
	Name        string  `json:"name"`
	Roomid      int     `json:"roomid"`
	CoverImg    string  `json:"cover_img"`
	StartTime   int64   `json:"start_time"`
	EndTime     int64   `json:"end_time"`
	AnchorName  string  `json:"anchor_name"`
	ShareImg    string  `json:"share_img"`
	Goods       []Goods `json:"goods"`
	Total       int     `json:"total"`
	Live_status int     `json:"live_status"`
}

type RoomInfoRes

type RoomInfoRes struct {
	util.CommonError

	RoomInfo []RoomInfo `json:"room_info"`
}

type RoomReplayRes

type RoomReplayRes struct {
	util.CommonError

	LiveReplay []LiveReplay `json:"live_replay"`
	Total      int          `json:"total"`
}

type RoomRes

type RoomRes struct {
	util.CommonError

	RoomId int `json:"roomId"`
	// 当主播微信号没有在 “小程序直播“ 小程序实名认证 返回该字段
	Qrcode_url string `json:"qrcode_url"`
}

Jump to

Keyboard shortcuts

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