model

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: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PlatAndroid is int8 for android.
	PlatAndroid = int8(0)
	// PlatIPhone is int8 for iphone.
	PlatIPhone = int8(1)
	// PlatIPad is int8 for ipad.
	PlatIPad = int8(2)
	// PlatWPhone is int8 for wphone.
	PlatWPhone = int8(3)
	// PlatAndroidG is int8 for Android Googleplay.
	PlatAndroidG = int8(4)
	// PlatIPhoneI is int8 for Iphone Global.
	PlatIPhoneI = int8(5)
	// PlatIPadI is int8 for IPAD Global.
	PlatIPadI = int8(6)
	// PlatAndroidTV is int8 for AndroidTV Global.
	PlatAndroidTV = int8(7)
	// PlatAndroidI is int8 for Android Global.
	PlatAndroidI = int8(8)
	// PlatIpadHD is int8 for IpadHD
	PlatIpadHD = int8(9)
)
View Source
const (
	// EnvPro is pro.
	EnvPro = "pro"
	// EnvTest is env.
	EnvTest = "test"
	// EnvDev is env.
	EnvDev = "dev"
	// MaxUploadSize for h5 upload
	MaxUploadSize = 20 * 1024 * 1024
)
View Source
const (
	// StateNoReply 未回复
	StateNoReply = 0
	// StateReplied 已回复
	StateReplied = 1
	// StateRepeated 二次追问
	StateRepeated = 2
	// StateOther 其它
	StateOther = 4

	// TypeCustomer 客户
	TypeCustomer = 0
	// TypeServer 客服
	TypeServer = 1
	// player cast screen
	AndroidPlayerScreen        = int64(464)
	AndroidPlayerScreenNothing = int64(465)
	AndroidPlayerScreenDlna    = int64(466)
	AndroidPlayerScreenTV      = int64(470)
	IOSPlayerScreen            = int64(467)
	IOSPlayerScreenNothing     = int64(468)
	IOSPlayerScreenDlna        = int64(469)
	IOSPlayerScreenTV          = int64(471)
)

feedback model const.

Variables

View Source
var (
	// Tags emmm...
	Tags = map[string]map[string][]*Tag{
		"main": map[string][]*Tag{
			"ios": []*Tag{
				{95, "账号相关", 0, ""},
				{481, "播放相关", 0, ""},
				{475, "投稿相关", 0, ""},
				{163, "番剧相关", 0, ""},
				{132, "弹幕", 0, ""},
				{178, "首页推荐", 0, ""},
				{152, "网站内容", 0, ""},
				{192, "免流卡", 0, ""},
				{365, "会员购", 0, ""},
				{478, "创作中心", 0, ""},
				{98, "其他功能建议", 0, ""},
			},
			"android": []*Tag{
				{14, "账号相关", 0, ""},
				{182, "播放相关", 0, ""},
				{476, "投稿相关", 0, ""},
				{162, "番剧相关", 0, ""},
				{27, "弹幕", 0, ""},
				{177, "首页推荐", 0, ""},
				{150, "网站内容", 0, ""},
				{191, "免流卡", 0, ""},
				{363, "会员购", 0, ""},
				{477, "创作中心", 0, ""},
				{43, "其他功能建议", 0, ""},
			},
		},
		"player": map[string][]*Tag{
			"ios": []*Tag{
				{100, "无限小电视", 0, ""},

				{101, "黑屏", 0, ""},
				{143, "音画不同步", 0, ""},
				{134, "弹幕无法显示", 0, ""},
			},
			"android": []*Tag{
				{183, "无限小电视", 0, ""},
				{184, "播放卡顿", 0, ""},
				{185, "网页劫持", 0, ""},
				{186, "拖动进度条失败", 0, ""},
				{187, "黑屏", 0, ""},
				{188, "音画不同步", 0, ""},
				{70, "弹幕无法显示", 0, ""},
			},
		},
		"live": map[string][]*Tag{
			"ios": []*Tag{
				{444, "播放卡顿", 0, ""},
				{445, "打开直播间速度慢", 0, ""},
				{452, "无限小电视", 0, ""},
				{450, "音画不同步", 0, ""},
				{446, "黑屏", 0, ""},
				{448, "画面比例异常", 0, ""},
				{447, "绿屏", 0, ""},
				{451, "片段循环", 0, ""},
				{449, "弹幕卡顿", 0, ""},
				{453, "其他问题或建议", 0, ""},
			},
			"android": []*Tag{
				{454, "播放卡顿", 0, ""},
				{455, "打开直播间速度慢", 0, ""},
				{462, "无限小电视", 0, ""},
				{460, "音画不同步", 0, ""},
				{456, "黑屏", 0, ""},
				{457, "画面比例异常", 0, ""},
				{458, "绿屏", 0, ""},
				{461, "片段循环", 0, ""},
				{459, "弹幕卡顿", 0, ""},
				{463, "其他问题或建议", 0, ""},
			},
		},
	}
)

Functions

func FormPlatForm

func FormPlatForm(platStr string) (plat int)

FormPlatForm fro playerCheck.

func InetAtoN

func InetAtoN(s string) (sum uint32)

InetAtoN conver ip addr to uint32.

func InetNtoA

func InetNtoA(sum uint32) string

InetNtoA conver uint32 to ip addr.

func IsAndroid

func IsAndroid(plat int8) bool

IsAndroid check plat is android or ipad.

func IsIOS

func IsIOS(plat int8) bool

IsIOS check plat is iphone or ipad.

func IsIPad

func IsIPad(plat int8) bool

IsIPad check plat is pad.

func IsIPhone

func IsIPhone(plat int8) bool

IsIPhone check plat is iphone.

func IsOverseas

func IsOverseas(plat int8) bool

IsOverseas is overseas

func IsPlayerScreen

func IsPlayerScreen(tagID int64) bool

IsPlayerScreen check plat is iphone or ipad.

func Plat

func Plat(mobiApp, device string) int8

Plat return plat by platStr or mobiApp

Types

type Reply

type Reply struct {
	ID        int64     `json:"-"`
	SessionID int64     `json:"-"`
	ReplyID   string    `json:"reply_id"`
	Type      int8      `json:"type"`
	Content   string    `json:"content"`
	ImgURL    string    `json:"img_url"`
	LogURL    string    `json:"log_url"`
	CTime     time.Time `json:"ctime"`
	MTime     time.Time `json:"-"`
}

Reply is feedback reply

type Replys

type Replys []Reply

Replys for sort by ctime asc

func (Replys) Len

func (t Replys) Len() int

func (Replys) Less

func (t Replys) Less(i, j int) bool

func (Replys) Swap

func (t Replys) Swap(i, j int)

type Session

type Session struct {
	ID          int64     `json:"id"`
	Buvid       string    `json:"-"`
	System      string    `json:"-"`
	Version     string    `json:"-"`
	Mid         int64     `json:"-"`
	Aid         string    `json:"-"`
	Content     string    `json:"content"`
	ImgURL      string    `json:"-"`
	LogURL      string    `json:"-"`
	Device      string    `json:"-"`
	Channel     string    `json:"-"`
	IP          uint32    `json:"-"`
	NetState    string    `json:"-"`
	NetOperator string    `json:"-"`
	AgencyArea  string    `json:"-"`
	Platform    string    `json:"-"`
	Browser     string    `json:"-"`
	Email       string    `json:"-"`
	QQ          string    `json:"-"`
	State       int8      `json:"state"`
	ReplyID     string    `json:"-"`
	ReplyTime   time.Time `json:"-"`
	LasterTime  time.Time `json:"-"`
	CTime       time.Time `json:"ctime"`
	MTime       time.Time `json:"-"`
}

Session is feedback session

type SsnAndTagID

type SsnAndTagID struct {
	TagID     int64 `json:"tag_id"`
	SessionID int64 `json:"session_id"`
}

SsnAndTagID ssn and tagid.

type Tag

type Tag struct {
	ID       int64  `json:"id"`
	Name     string `json:"name"`
	Type     int    `json:"type"`
	Platform string `json:"platform"`
}

Tag tag.

type UGCTag

type UGCTag struct {
	Tags  map[string][]*Tag `json:"tags"`
	Limit int               `json:"limit"`
}

UGCTag ugc tag.

type WebSession

type WebSession struct {
	Session *Session `json:"session,omitempty"`
	Tag     *Tag     `json:"tag,omitempty"`
}

WebSession web session.

Jump to

Keyboard shortcuts

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