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: 4 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)
	// PlatAndroidB is int8 for Android Blue.
	PlatAndroidB = int8(10)
	// PlatIPhoneB is int8 for Android Blue.
	PlatIPhoneB = int8(11)

	GotoAv             = "av"
	GotoWeb            = "web"
	GotoBangumi        = "bangumi"
	GotoMovie          = "movie"
	GotoBangumiWeb     = "bangumi_web"
	GotoSp             = "sp"
	GotoLive           = "live"
	GotoGame           = "game"
	GotoAuthor         = "author"
	GotoClip           = "clip"
	GotoAlbum          = "album"
	GotoArticle        = "article"
	GotoAudio          = "audio"
	GotoSpecial        = "special"
	GotoBanner         = "banner"
	GotoSpecialS       = "special_s"
	GotoConverge       = "converge"
	GOtoRecommendWord  = "recommend_word"
	GotoPGC            = "pgc"
	GotoSuggestKeyWord = "suggest_keyword"
	GotoComic          = "comic"
	GotoChannel        = "channel"
	GotoEP             = "ep"
	GotoTwitter        = "twitter"
	GotoStar           = "star"
	GotoTicket         = "ticket"
	GotoProduct        = "product"
	GotoSpace          = "space"
	GotoSpecialerGuide = "special_guide"
	GotoDynamic        = "dynamic"
	// EnvPro is pro.
	EnvPro = "pro"
	EnvHK  = "hk"
	// EnvTest is env.
	EnvTest = "test"
	// EnvDev is env.
	EnvDev = "dev"
	// ForbidCode is forbid by law
	ForbidCode   = -110
	NoResultCode = -111

	CoverIng      = "即将上映"
	CoverPay      = "付费观看"
	CoverFree     = "免费观看"
	CoverVipFree  = "付费观看"
	CoverVipOnly  = "专享"
	CoverVipFirst = "抢先"

	Hans = "hans"
	Hant = "hant"

	// AttrNo attribute no
	AttrNo = int32(0)
	// AttrYes attribute yes
	AttrYes = int32(1)

	AttrBitArchive = uint32(0)
	AttrBitArticle = uint32(1)
	AttrBitClip    = uint32(2)
	AttrBitAlbum   = uint32(3)
	AttrBitAudio   = uint32(34)
)

app-interface const

Variables

View Source
var (
	AvHandler = func(a *archive.Archive3) func(uri string) string {
		return func(uri string) string {
			if a == nil {
				return uri
			}
			if a.Dimension.Height != 0 || a.Dimension.Width != 0 {
				return fmt.Sprintf("%s?player_width=%d&player_height=%d&player_rotate=%d", uri, a.Dimension.Width, a.Dimension.Height, a.Dimension.Rotate)
			}
			return uri
		}
	}
	LiveHandler = func(l *livemdl.RoomInfo) func(uri string) string {
		return func(uri string) string {
			if l == nil {
				return uri
			}
			if l.BroadcastType == 0 || l.BroadcastType == 1 {
				return fmt.Sprintf("%s?broadcast_type=%d", uri, l.BroadcastType)
			}
			return uri
		}
	}
)

for FillURI

Functions

func AttrSet

func AttrSet(attr int32, v int32, bit uint32) int32

AttrSet set attribute value

func AttrVal

func AttrVal(attr int32, bit uint32) (v int32)

AttrVal get attribute value

func EnvRun

func EnvRun() (res bool)

env sh001 run

func FillURI

func FillURI(gt, param string, f func(uri string) string) (uri string)

FillURI deal app schema.

func FormMediaType

func FormMediaType(mediaType int) (mediaName string)

FormMediaType media type

func InvalidBuild

func InvalidBuild(srcBuild, cfgBuild int, cfgCond string) bool

InvalidBuild invalid build

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 IsIPhoneB

func IsIPhoneB(plat int8) bool

IsIPhoneB check plat is iphone_b.

func IsOverseas

func IsOverseas(plat int8) bool

IsOverseas is overseas

func Plat

func Plat(mobiApp, device string) int8

Plat return plat by platStr or mobiApp

func StatusMark

func StatusMark(status int) string

StatusMark cover status mark

Types

type Cursor

type Cursor struct {
	Current   int64
	Direction Direction
	Size      int
}

Cursor struct

func NewCursor

func NewCursor(maxID int64, minID int64, size int) (cuser *Cursor, err error)

NewCursor judge cuser

func (*Cursor) Latest

func (c *Cursor) Latest() bool

Latest judge cursor Current

func (*Cursor) MoveDownward

func (c *Cursor) MoveDownward() bool

MoveDownward judge cursor Direction

func (*Cursor) MoveUpward

func (c *Cursor) MoveUpward() bool

MoveUpward judge cursor Direction

type Direction

type Direction int

Direction define

const (
	Upward   Direction = 1
	Downward Direction = 2
)

app-interface const

type ReasonStyle

type ReasonStyle struct {
	Text             string `json:"text,omitempty"`
	TextColor        string `json:"text_color,omitempty"`
	TextColorNight   string `json:"text_color_night,omitempty"`
	BgColor          string `json:"bg_color,omitempty"`
	BgColorNight     string `json:"bg_color_night,omitempty"`
	BorderColor      string `json:"border_color,omitempty"`
	BorderColorNight string `json:"border_color_night,omitempty"`
	BgStyle          int8   `json:"bg_style,omitempty"`
}

ReasonStyle reason style

Jump to

Keyboard shortcuts

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