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 Global.
	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)
	// PlatAndroidB is int8 for Android Bule.
	PlatAndroidB = int8(9)

	GotoAv          = "av"
	GotoWeb         = "web"
	GotoBangumi     = "bangumi"
	GotoBangumiWeb  = "bangumi_web"
	GotoSp          = "sp"
	GotoLive        = "live"
	GotoGame        = "game"
	GotoArticle     = "article"
	GotoActivity    = "activity_new"
	GotoTopic       = "topic_new"
	GotoDaily       = "daily"
	GotoRank        = "rank"
	GotoCard        = "card"
	GotoVeidoCard   = "video_card"
	GotoSpecialCard = "special_card"
	GotoTagCard     = "tag_card"
	GotoColumn      = "column"
	GotoColumnStage = "column_stage"
	GotoTagID       = "tag_id"
	GotoHotTopic    = "hottopic"
	GotoUpRcmdNew   = "up_rcmd_new"
	GotoUpRcmdNewV2 = "up_rcmd_new_v2"
	GotoHotDynamic  = "hot_dynamic"
	GotoEventTopic  = "event_topic"

	CardGotoAv       = int8(1)
	CardGotoTopic    = int8(2)
	CardGotoActivity = int8(3)

	// EnvPro is pro.
	EnvPro = "pro"
	// EnvTest is env.
	EnvTest = "test"
	// EnvDev is env.
	EnvDev = "dev"

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

Variables

View Source
var (
	AvHandler = func(a *api.Arc) 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
		}
	}
)

Functions

func CoverURL

func CoverURL(uri string) (cover string)

CoverURL convert cover url to full url.

func CoverURLHTTPS

func CoverURLHTTPS(uri string) (cover string)

func FillURI

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

FillURI deal app schema.

func FillURIBangumi

func FillURIBangumi(gt, seasonID, episodeID string, episodeType int) (uri string)

func FillURICategory

func FillURICategory(gt, columnID, sectionID string) (uri string)

FillURICategory deal app schema.

func FillURIHotTopic

func FillURIHotTopic(tagID, tagName string) (uri string)

func InvalidBuild

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

InvalidBuild check source build is not allow by config build and condition. eg: when condition is gt, means srcBuild must gt cfgBuild, otherwise is invalid srcBuild.

func InvalidChannel

func InvalidChannel(plat int8, srcCh, cfgCh string) bool

InvalidChannel check source channel is not allow by config channel.

func IsAndroid

func IsAndroid(plat int8) bool

IsAndroid check plat is android or ipad.

func IsGoto

func IsGoto(gt string) bool

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 IsOverseas

func IsOverseas(plat int8) bool

IsOverseas is overseas

func MobiAPPBuleChange

func MobiAPPBuleChange(mobiApp string) string

func MobiApp

func MobiApp(plat int8) string

MobiApp plat by mobi_app

func Plat

func Plat(mobiApp, device string) int8

Plat return plat by platStr or mobiApp

func Rounding

func Rounding(number, divisor int64) string

func StatusMark

func StatusMark(status int8) string

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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