common.go 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. package common
  2. const (
  3. BitWiseBVC = 1
  4. BitWiseKS = 2
  5. BitWiseQN = 4
  6. BitWiseTC = 8
  7. BitWiseWS = 16
  8. WSSrc = 1
  9. TXYSrc = 16
  10. BVCSrc = 32
  11. JSSrc = 68
  12. QNSrc = 70
  13. WSName = "ws"
  14. TXYName = "txy"
  15. BVCName = "bvc"
  16. JSName = "js"
  17. QNName = "qn"
  18. WsChinaName = "网宿"
  19. TXYChinaName = "腾讯云"
  20. BVCChinaName = "视频云"
  21. JSChinaName = "金山"
  22. QNChinaName = "七牛"
  23. AREAIDCHICKEN = 80
  24. ChickenAttention = 1000
  25. )
  26. // CdnMapSrc cdn&src映射
  27. var CdnMapSrc = map[string]int8{
  28. WSName: WSSrc,
  29. TXYName: TXYSrc,
  30. BVCName: BVCSrc,
  31. JSName: JSSrc,
  32. QNName: QNSrc,
  33. }
  34. // SrcMapBitwise 新老src直接的映射关系
  35. var SrcMapBitwise = map[int8]int64{
  36. WSSrc: BitWiseWS,
  37. TXYSrc: BitWiseTC,
  38. BVCSrc: BitWiseBVC,
  39. JSSrc: BitWiseKS,
  40. QNSrc: BitWiseQN,
  41. }
  42. // BitwiseMapSrc 新老src直接的映射关系
  43. var BitwiseMapSrc = map[int64]int8{
  44. BitWiseWS: WSSrc,
  45. BitWiseTC: TXYSrc,
  46. BitWiseBVC: BVCSrc,
  47. BitWiseKS: JSSrc,
  48. BitWiseQN: QNSrc,
  49. }
  50. // ChinaNameMapBitwise
  51. var ChinaNameMapBitwise = map[string]int64{
  52. WsChinaName: BitWiseWS,
  53. TXYChinaName: BitWiseTC,
  54. BVCChinaName: BitWiseBVC,
  55. JSChinaName: BitWiseKS,
  56. QNChinaName: BitWiseQN,
  57. }
  58. // NameMapBitwise
  59. var NameMapBitwise = map[int64]string{
  60. BitWiseWS: WsChinaName,
  61. BitWiseTC: TXYChinaName,
  62. BitWiseBVC: BVCChinaName,
  63. BitWiseKS: JSChinaName,
  64. BitWiseQN: QNChinaName,
  65. }
  66. // CdnBitwiseMap 位运算对应表
  67. var CdnBitwiseMap = map[string]int64{
  68. BVCName: BitWiseBVC,
  69. JSName: BitWiseKS,
  70. QNName: BitWiseQN,
  71. TXYName: BitWiseTC,
  72. WSName: BitWiseWS,
  73. }
  74. // BitwiseMapName 新src对应关系
  75. var BitwiseMapName = map[int64]string{
  76. BitWiseWS: WSName,
  77. BitWiseTC: TXYName,
  78. BitWiseBVC: BVCName,
  79. BitWiseKS: JSName,
  80. BitWiseQN: QNName,
  81. }
  82. // NewLinkMap 新origin
  83. var NewLinkMap = map[int64]map[string]string{
  84. BitWiseBVC: {
  85. "newLink": "http://live-schedule.acgvideo.com/live-upbvc?up_rtmp=",
  86. "newLinkHttps": "https://live-schedule.acgvideo.com/live-upbvc?up_rtmp=",
  87. },
  88. BitWiseTC: {
  89. "newLink": "http://tcdns.myqcloud.com:8086/bilibili_redirect?up_rtmp=",
  90. "newLinkHttps": "https://tcdns.myqcloud.com/bilibili_redirect?up_rtmp=",
  91. },
  92. BitWiseKS: {
  93. "newLink": "http://cwwshdns.ksyun.com/a?up_rtmp=",
  94. "newLinkHttps": "https://cwwshdns.ksyun.com/a?up_rtmp=",
  95. },
  96. BitWiseWS: {
  97. "newLink": "http://sdkbilibili.wscdns.com/bilibili?up_rtmp=",
  98. "newLinkHttps": "https://sdkbilibili.wscdns.com?up_rtmp=",
  99. },
  100. BitWiseQN: {
  101. "newLink": "http://pili-ipswitch.qiniuapi.com/v1/bilibili/publish?up_rtmp=",
  102. "newLinkHttps": "https://pili-ipswitch.qiniuapi.com/v1/bilibili/publish?up_rtmp=",
  103. },
  104. }
  105. // 流线路名称
  106. var LineName = map[int64]string{
  107. BitWiseBVC: "线路二",
  108. BitWiseTC: "线路一",
  109. BitWiseKS: "线路四",
  110. BitWiseWS: "线路三",
  111. BitWiseQN: "线路五",
  112. 0: "默认路线",
  113. }
  114. // CDNSalt cdn&salt map
  115. var CDNSalt = map[string]string{
  116. "bvc": "bvc_1701101740",
  117. "js": "js_1703271720",
  118. "qn": "qn_1703271730",
  119. "txy": "txy_1610171720",
  120. "ws": "ws_1608121700",
  121. }