constants.go 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. package model
  2. const (
  3. // TempTaskPrefix used to separate from the DB tasks.
  4. TempTaskPrefix = "t"
  5. // APPIDBBPhone 哔哩哔哩动画
  6. APPIDBBPhone = 1
  7. // HTTPCodeOk http response normally.
  8. HTTPCodeOk = 0
  9. // SwitchOff off.
  10. SwitchOff = 0
  11. // SwitchOn on.
  12. SwitchOn = 1
  13. // DelMiFeedback feedback 删除 (无效token删除方式)
  14. DelMiFeedback = 1
  15. // DelMiUninstalled 卸载
  16. DelMiUninstalled = 2
  17. // DefaultMessageTitle .
  18. DefaultMessageTitle = "哔哩哔哩消息"
  19. // UnknownBuild 未知build号
  20. UnknownBuild = 0
  21. )
  22. const (
  23. // MobiAndroid mobi_app android
  24. MobiAndroid = 1
  25. // MobiIPhone mobi_app iPhone
  26. MobiIPhone = 2
  27. // MobiIPad mobi_app iPad
  28. MobiIPad = 3
  29. // MobiAndroidComic
  30. MobiAndroidComic = 4
  31. )
  32. // task status
  33. const (
  34. // TaskStatusPending 待审核
  35. TaskStatusPending = int8(-5)
  36. // TaskStatusStop 主动停止
  37. TaskStatusStop = int8(-4)
  38. // TaskStatusDelay 延期
  39. TaskStatusDelay = int8(-3)
  40. // TaskStatusExpired 过期
  41. TaskStatusExpired = int8(-2)
  42. // TaskStatusFailed 失败
  43. TaskStatusFailed = int8(-1)
  44. // TaskStatusPrepared 未开始
  45. TaskStatusPrepared = int8(0)
  46. // TaskStatusDoing 进行中
  47. TaskStatusDoing = int8(1)
  48. // TaskStatusDone 已完成
  49. TaskStatusDone = int8(2)
  50. // TaskStatusPretreatmentPrepared 等待预处理,处理完后是按平台拆成任务(token形式)
  51. TaskStatusPretreatmentPrepared = int8(3)
  52. // TaskStatusPretreatmentDoing 预处理中
  53. TaskStatusPretreatmentDoing = int8(4)
  54. // TaskStatusPretreatmentDone 预处理完成
  55. TaskStatusPretreatmentDone = int8(5)
  56. // TaskStatusPretreatmentFailed 预处理失败
  57. TaskStatusPretreatmentFailed = int8(6)
  58. // TaskStatusWaitDataPlatform 等待从数据平台获取数据
  59. TaskStatusWaitDataPlatform = int8(7)
  60. )
  61. // data platform
  62. const (
  63. // DpCondStatusNoFile 没有查询到文件
  64. DpCondStatusNoFile = -3
  65. // DpCondStatusPending 待审核
  66. DpCondStatusPending = -2
  67. // DpCondStatusFailed 失败的查询
  68. DpCondStatusFailed = -1
  69. // DpCondStatusPrepared 准备提交到数据平台的查询
  70. DpCondStatusPrepared = 0
  71. // DpCondStatusSubmitting 提交中
  72. DpCondStatusSubmitting = 1
  73. // DpCondStatusSubmitted 已经提交的查询
  74. DpCondStatusSubmitted = 2
  75. // DpCondStatusPolling 轮询任务看有没有生成文件
  76. DpCondStatusPolling = 3
  77. // DpCondStatusDownloading 正在下载文件
  78. DpCondStatusDownloading = 4
  79. // DpCondStatusDone 已经完成的查询
  80. DpCondStatusDone = 5
  81. // DpTaskTypeMid mid维度查询
  82. DpTaskTypeMid = 1
  83. // DptaskTypeToken token维度查询
  84. DpTaskTypeToken = 2
  85. )
  86. const (
  87. // TaskTypeAll 后台全量
  88. TaskTypeAll = 1
  89. // TaskTypePart 后台批量
  90. TaskTypePart = 2
  91. // TaskTypeBusiness 业务推送
  92. TaskTypeBusiness = 3
  93. // TaskTypeTokens 批量token推送
  94. TaskTypeTokens = 4
  95. // TaskTypeMngMid 后台按mid推送
  96. TaskTypeMngMid = 5
  97. // TaskTypeMngToken 后台按token推送
  98. TaskTypeMngToken = 6
  99. // TaskTypeStrategyMid 策略层按mid推送
  100. TaskTypeStrategyMid = 7
  101. // TaskTypeDataPlatformMid 通过mid维度从数据平台获取token
  102. TaskTypeDataPlatformMid = 8
  103. // TaskTypeDataPlatformToken 通过token维度从数据平台获取token
  104. TaskTypeDataPlatformToken = 9
  105. )
  106. const (
  107. // LinkTypeBangumi bangumi 协议链接类型
  108. LinkTypeBangumi = int8(1)
  109. // LinkTypeVideo 视频
  110. LinkTypeVideo = int8(2)
  111. // LinkTypeLive 直播
  112. LinkTypeLive = int8(3)
  113. // LinkTypeSplist 专题页
  114. LinkTypeSplist = int8(4)
  115. // LinkTypeSearch 搜索
  116. LinkTypeSearch = int8(5)
  117. // LinkTypeAuthor 个人空间
  118. LinkTypeAuthor = int8(6)
  119. // LinkTypeBrowser 浏览器
  120. LinkTypeBrowser = int8(7)
  121. // LinkTypeVipBuy 大会员购买页
  122. LinkTypeVipBuy = int8(10)
  123. // LinkTypeCustom 自定义协议内容
  124. LinkTypeCustom = int8(11)
  125. )
  126. const (
  127. // 定义参考:http://syncsvn.bilibili.co/app/wiki/blob/master/Android-App-URI.md
  128. // SchemeBangumiSeasonIOS 番剧详情 iPhone,iPadHD 支持番剧
  129. SchemeBangumiSeasonIOS = "bilibili://bangumi/season/"
  130. // SchemeBangumiSeasonAndroid .
  131. SchemeBangumiSeasonAndroid = "bili:///?type=season&season_id="
  132. // SchemeVideoIOS 视频详情页 iPhone,iPadHD 支持视频
  133. SchemeVideoIOS = "bilibili://video/"
  134. // SchemeVideoAndroid .
  135. SchemeVideoAndroid = "bili:///?type=bilivideo&avid="
  136. // SchemeLive 直播详情页, 支持 iOS 和 Android 新协议
  137. SchemeLive = "bilibili://live/"
  138. // SchemeLiveAndroid Android 老协议
  139. SchemeLiveAndroid = "bili:///?type=bililive&roomid="
  140. // SchemeSplist 专题页 iPhone, iPadHD, Android 支持专题
  141. SchemeSplist = "bilibili://splist/"
  142. // SchemeSearchIOS 搜索 iPhone,iPadHD 支持搜索
  143. SchemeSearchIOS = "bilibili://search/?keyword="
  144. // SchemeSearchAndroid .
  145. SchemeSearchAndroid = "bilibili://search/"
  146. // SchemeAuthorIOS 个人空间 iPhone,iPadHD 支持个人空间
  147. SchemeAuthorIOS = "bilibili://user/"
  148. // SchemeAuthorAndroid .
  149. SchemeAuthorAndroid = "bilibili://author/"
  150. // SchemeBrowserIOS 指定URL iPhone,iPadHD 支持H5
  151. SchemeBrowserIOS = "bilibili://browser/?url="
  152. // SchemeBrowserAndroid .
  153. SchemeBrowserAndroid = "bili:///?type=weblink&url="
  154. // SchemeVipBuy 大会员购买页
  155. SchemeVipBuy = "bilibili://user_center/vip/buy/"
  156. )