@@ -0,0 +1,375 @@
|
||||
package constant
|
||||
|
||||
import "strings"
|
||||
|
||||
const (
|
||||
//DevRunmod 开发环境
|
||||
DevRunmod = "dev"
|
||||
//TestRunmod 测试环境
|
||||
TestRunmod = "test"
|
||||
//RelRunmod 生产环境
|
||||
ReleaseRunmod = "prod"
|
||||
//ChannelTypeFile 渠道日志导出
|
||||
ChannelLogTypeFile = 1
|
||||
//ChannelNumTypeFile 渠道号导出
|
||||
ChannelNumTypeFile = 2
|
||||
//UserList 用户列表导出
|
||||
UserList = 3
|
||||
Ver1_6_4 = "1.6.4"
|
||||
Ver2_1_0 = "2.1.0"
|
||||
Ver3_0_7 = "3.0.7"
|
||||
Ver3_1_0 = "3.1.0"
|
||||
Ver3_6_0 = "3.6.0" //更换了加密方式, 增加了注册 devID 签名校验, 修正了x-api-key的问题
|
||||
)
|
||||
|
||||
const DefaultBloggerVideoIncomeTaxLevel int64 = 4
|
||||
|
||||
type NewsType = string
|
||||
type AcgNewsType = string
|
||||
type KeywordType = string
|
||||
|
||||
// 全局统一类型
|
||||
const (
|
||||
SP NewsType = "SP" // 长视频
|
||||
SHORT NewsType = "SHORT" // 短视频
|
||||
COVER NewsType = "COVER" // 图文帖子
|
||||
PIC NewsType = "PIC" // 图集帖子
|
||||
AD_COVER NewsType = "AD_COVER" // 图片广告
|
||||
AD_SP NewsType = "AD_SP" // 视频广告
|
||||
SEED_LINK NewsType = "SEED_LINK" // 种子/黄油帖子
|
||||
AiPlaza string = "AiPlaza" // ai广场
|
||||
|
||||
KeywordTag KeywordType = "TAG" // 标签关键词
|
||||
KeywordUser KeywordType = "USER" // 用户关键词
|
||||
KeywordComment KeywordType = "COMMENT" // 评论关键词
|
||||
|
||||
Cartoon AcgNewsType = "video" // 动漫
|
||||
Comics AcgNewsType = "image" // 漫画
|
||||
Text AcgNewsType = "text" // 小说
|
||||
Drama AcgNewsType = "drama" // 短剧
|
||||
)
|
||||
|
||||
type RealmType = string
|
||||
|
||||
const (
|
||||
SearchSP RealmType = SP
|
||||
SearchShort RealmType = SHORT
|
||||
SearchCover RealmType = COVER
|
||||
SearchPic RealmType = PIC
|
||||
|
||||
SearchTag RealmType = KeywordTag
|
||||
SearchUser RealmType = KeywordUser
|
||||
|
||||
// 单个功能特殊自定义
|
||||
//SearchAll = RealmType("ALL") // 搜索全部
|
||||
SearchComplex = RealmType("COMPLEX")
|
||||
|
||||
// Deprecated
|
||||
FictionRealmType RealmType = "fiction"
|
||||
// Deprecated
|
||||
AudioBookRealmType RealmType = "audiobook"
|
||||
)
|
||||
|
||||
// 收藏类型
|
||||
type CollectType = string
|
||||
|
||||
const (
|
||||
CollectTypeSP CollectType = SP // 影视
|
||||
CollectTypeShort CollectType = SHORT // 短视频
|
||||
CollectTypeCover CollectType = COVER // 图文
|
||||
CollectTypePIC CollectType = PIC // 图集帖子
|
||||
CollectTypeSEED_LINK CollectType = SEED_LINK // 黄油/种子帖子
|
||||
CollectTypeAiPlaza CollectType = AiPlaza // ai广场帖子
|
||||
|
||||
CollectTypeTag CollectType = KeywordTag // 话题
|
||||
|
||||
// Deprecated
|
||||
CollectTypeLocation = "location"
|
||||
)
|
||||
|
||||
// 点赞类型
|
||||
type LikeType = string
|
||||
|
||||
const (
|
||||
LikeTypeSP LikeType = SP // 长视频
|
||||
LikeTypeShort LikeType = SHORT // 短视频
|
||||
LikeTypeCover LikeType = COVER // 图文
|
||||
LikeTypePic LikeType = PIC // 图集
|
||||
LikeTypeSEED_LINK LikeType = SEED_LINK // 黄油种子帖
|
||||
LikeTypeAiPlaza LikeType = AiPlaza // ai广场帖子
|
||||
|
||||
// ACG "video":视频,"image":图片,"text":小说
|
||||
LikeTypeCartoon LikeType = Cartoon // 动漫
|
||||
LikeTypeComics LikeType = Comics // 漫画
|
||||
LikeTypeText LikeType = Text // 小说
|
||||
LikeTypeDrama LikeType = Drama // 短剧
|
||||
|
||||
LikeTypeComment LikeType = KeywordComment // 评论
|
||||
)
|
||||
|
||||
// 评论状态
|
||||
const (
|
||||
CommentSTSAccessed = 1 // 通过审核
|
||||
CommentSTSDeleted = 2 // 已删除
|
||||
CommentSTSAutoFiltered = 3 // 被自动过滤
|
||||
)
|
||||
|
||||
// 设备
|
||||
const (
|
||||
DeviceTypeIOS = "ios"
|
||||
DeviceTypeAndroid = "android"
|
||||
DeviceTypeH5 = "h5"
|
||||
)
|
||||
|
||||
const AdGroupClientVersion = "1.12.2" // 这里得改成自己上线的这个ab测安卓版本号
|
||||
|
||||
// 机型
|
||||
const (
|
||||
SysTypeIOS = "ios"
|
||||
SysTypeAndroid = "android"
|
||||
SysTypeH5 = "h5"
|
||||
)
|
||||
|
||||
// gin中ctx使用的key
|
||||
const (
|
||||
CtxUserID = "USER_ID"
|
||||
CtxAdminAct = "ADMIN_ACT"
|
||||
CtxDistrictName = "DISTRICT_USER_ID"
|
||||
CtxUA = "UA"
|
||||
CtxIP = "IP"
|
||||
CtxJuShangCID = "JU_SHANG_CID"
|
||||
CtxAdminRole = "ADMIN_ROLE"
|
||||
CtxNudeChatMerchant = "Nude_Chat_Merchant"
|
||||
)
|
||||
|
||||
const (
|
||||
CaptchaLen = 6
|
||||
)
|
||||
|
||||
const (
|
||||
ProdEnv = "prod"
|
||||
)
|
||||
|
||||
// 推广码链接参数
|
||||
const (
|
||||
PromotionField = "?pc="
|
||||
DiscField = "?dc="
|
||||
)
|
||||
|
||||
// web操作栏目
|
||||
const (
|
||||
Administrator = "系统管理员"
|
||||
AuthorManager = "权限管理"
|
||||
UserManageList = "用户列表"
|
||||
VideoManageCheck = "视频审核"
|
||||
VideoManageList = "视频列表"
|
||||
VideoDiscountArea = "折扣专区"
|
||||
VideoDiscountAreaVideo = "折扣专区视频"
|
||||
VideoManageTag = "标签管理"
|
||||
VideoManageCity = "城市列表"
|
||||
VideoManageHotCity = "热门城市"
|
||||
VideoManageComment = "评论管理"
|
||||
VideoManageSource = "资源管理"
|
||||
VideoManageTone = "音色最热"
|
||||
ProductManageVIP = "vip商品列表"
|
||||
ProductManageCoin = "金币列表"
|
||||
ProductManagePage = "推广落地页配置"
|
||||
ProductManagePayType = "支付方式"
|
||||
TradeManageRechargeOrder = "充值订单管理"
|
||||
TradeManageWithdrawOrder = "提现订单列表"
|
||||
FinancialTransferOrder = "财务转账列表"
|
||||
TradeManageWithdrawType = "提现方式配置"
|
||||
TradeManageWithdrawBank = "提现银行配置"
|
||||
TradeManageWithdrawRefund = "提现人工退款"
|
||||
RejectTemplate = "审核拒绝模板"
|
||||
|
||||
AdsManageAdsList = "广告列表"
|
||||
AdsManageAnnousList = "公告管理"
|
||||
AdsManageAnnounceList = "会员中心跑马灯管理"
|
||||
SystemManageVersion = "版本管理"
|
||||
ActiveManageList = "活动列表"
|
||||
IPBlockList = "IP限制列表"
|
||||
IPWhiteList = "IP白名单列表"
|
||||
IPWhiteRedisKey = "white_ip_"
|
||||
SwitchList = "开关量列表"
|
||||
AutoAccount = "自助结算审核"
|
||||
ExchangeCode = "兑换码管理"
|
||||
MerchantAdmin = "代充商人管理"
|
||||
Disc = "商区"
|
||||
GoldConfig = "支付优惠配置"
|
||||
FreeVidConfig = "免费观看配置"
|
||||
RoleConfig = "角色配置"
|
||||
JuShangManageList = "聚商管理"
|
||||
NewsModel = "嫩模活动"
|
||||
RewardList = "获奖列表"
|
||||
Loufeng = "楼风"
|
||||
VerifyReport = "验证报告"
|
||||
Fiction = "电子书小说"
|
||||
Audiobook = "有声小说"
|
||||
VIPConfig = "VIP配置"
|
||||
AiUndressList = "AI脱衣列表"
|
||||
IntegralConfig = "积分配置列表"
|
||||
IntegralExchange = "积分兑换列表"
|
||||
OfficialConfig = "官方配置"
|
||||
AiChangefaceVidMod = "AI换脸视频模版"
|
||||
AiChangeface = "AI视频换脸"
|
||||
AiChangeFaceImgList = "AI图片换脸列表"
|
||||
Section = "专题列表"
|
||||
VideoGoldCoinList = "金币视频列表"
|
||||
AdvanceConfig = "预售配置列表"
|
||||
OfficialWebsiteConfig = "官网配置"
|
||||
)
|
||||
|
||||
// web操作方式
|
||||
const (
|
||||
Add = "新增"
|
||||
Delete = "删除"
|
||||
Modify = "修改"
|
||||
)
|
||||
|
||||
// 推荐维度
|
||||
const (
|
||||
ChosenVideo = "chosenVideo"
|
||||
TagVideo = "tagVideo"
|
||||
SameCityVideo = "sameCityVideo"
|
||||
NewVideo = "newVideo"
|
||||
UnPopularVideo = "unPopularVideo"
|
||||
ForcePushSP = "forcePushSP" //强推视频纬度
|
||||
ChargeVideo = "chargeVideo"
|
||||
)
|
||||
|
||||
// IpBlock 类型
|
||||
const (
|
||||
BlockComment = "comment"
|
||||
FrequencyComment = "frequencyComment" // 评论频率
|
||||
Register = "login" //限制用户注册
|
||||
GlobalBlock = "global" //全局限制该IP用户访问
|
||||
)
|
||||
|
||||
// switch 落地页按钮类型
|
||||
type SwitchAct string
|
||||
|
||||
const (
|
||||
SwitchIosEnterprise SwitchAct = "iosEnterprise"
|
||||
SwitchIosStore SwitchAct = "iosStore" //商店包(TF包)
|
||||
SwitchAndroid SwitchAct = "android"
|
||||
)
|
||||
|
||||
// switch 落地页按钮样式
|
||||
type SwitchStyle string
|
||||
|
||||
const (
|
||||
SwitchStress SwitchStyle = "switchStress" //突出的开关风格
|
||||
SwitchSimple SwitchStyle = "switchSimple" //简单的开关风格
|
||||
)
|
||||
|
||||
// 机器人的uid最大值
|
||||
const (
|
||||
RobotUIDLimit = 111999
|
||||
)
|
||||
|
||||
// DeleteUID
|
||||
const (
|
||||
DeleteUID uint64 = 100008
|
||||
)
|
||||
|
||||
const (
|
||||
UserLowestTrueScore int64 = 10
|
||||
)
|
||||
|
||||
type DomainNameStatus int64
|
||||
|
||||
const (
|
||||
Normal DomainNameStatus = iota
|
||||
WxBlock
|
||||
)
|
||||
const (
|
||||
RCHG_Mode_SDK = "sdk"
|
||||
RCHG_Mode_URL = "url"
|
||||
RechargeAmtTolerance = 500
|
||||
)
|
||||
const (
|
||||
MongoRandomSpareLen int = 5
|
||||
)
|
||||
|
||||
const (
|
||||
Media_Del = 1 //"媒体删除"
|
||||
|
||||
Media_Edit_Status = 2 //"媒体更新状态"
|
||||
|
||||
Media_Edit_Price = 3 //"媒体更新价格"
|
||||
|
||||
Media_Edit_Content = 4 //"媒体更新标题内容"
|
||||
|
||||
Media_Edit_Remark = 5 //"媒体更新备注"
|
||||
|
||||
User_INCoin = 6 //"用户追加金币"
|
||||
|
||||
User_Edit_VIP_Type = 7 //"用户更新VIP类型"
|
||||
|
||||
User_Edit_VIP_PromoteEnd = 8 //"用户更新VIP新推广赠送免费到期时间"
|
||||
|
||||
User_Edit_VIP_Expire = 9 //"用户更新VIP过期时间"
|
||||
|
||||
User_Edit_VIP_RechargeLevel = 10 //"用户更新VIP充值等级"
|
||||
|
||||
User_INFruitCoin = 11 //"用户追加果币"
|
||||
|
||||
User_ReduceAmount = 12 //"回收用户金币"
|
||||
|
||||
User_ReduceIncome = 13 //"回收用户收益"
|
||||
|
||||
User_INAiMateBalance = 14 // 用户追加ai伴侣币
|
||||
|
||||
User_INIntegral = 15 //"用户追加积分"
|
||||
)
|
||||
|
||||
const (
|
||||
FakeMobilePrefix string = "+86122"
|
||||
)
|
||||
const (
|
||||
MediaSourceSP string = "sp"
|
||||
MediaSourceSPPrefixPath string = "/sp"
|
||||
MediaSourcePMS string = "pms"
|
||||
MediaSourcePMSPrefixPath string = "/pms"
|
||||
ImageSourceIMS string = "ims"
|
||||
ImageSourceIMSPrefixPath string = "/ims"
|
||||
MediaSourceJH1B string = "jh1b" // 嘉华1部
|
||||
MediaSourceLaoSiJi string = "laosiji" // 老司机
|
||||
MediaSourceAuthKey string = "fT5xSg4hltHpzVy6aV9rVECDJ1J1pN"
|
||||
)
|
||||
|
||||
// DefaultTsAuthKeyVersion 未配置密钥版本时的默认版本标识,随 TS URL 以 v={keyVersion} 下发。
|
||||
const DefaultTsAuthKeyVersion = "default"
|
||||
|
||||
// TsAuthKeyConfig 媒体分片(TS)鉴权签名密钥配置。
|
||||
type TsAuthKeyConfig struct {
|
||||
KeyVersion string `json:"keyVersion"` // 密钥版本,随 TS URL 以 v={keyVersion} 下发
|
||||
Key string `json:"key"` // 签名密钥
|
||||
}
|
||||
|
||||
// Resolve 返回生效的密钥版本与签名密钥:
|
||||
// 仅当未配置 Key(空或纯空白)时,才回退到内置默认——版本 DefaultTsAuthKeyVersion、密钥 MediaSourceAuthKey;
|
||||
// 配置了 Key 时,版本与密钥均按配置原样返回(版本可为空)。
|
||||
func (c TsAuthKeyConfig) Resolve() (keyVersion, key string) {
|
||||
if strings.TrimSpace(c.Key) == "" {
|
||||
return DefaultTsAuthKeyVersion, MediaSourceAuthKey
|
||||
}
|
||||
return strings.TrimSpace(c.KeyVersion), c.Key
|
||||
}
|
||||
|
||||
type Terminal = string //终端型号
|
||||
|
||||
const (
|
||||
TerminalAndroid Terminal = "0"
|
||||
TerminalH5 Terminal = "1"
|
||||
TerminalWeb Terminal = "2"
|
||||
)
|
||||
|
||||
// UIThemeEnum UI主题枚举
|
||||
type UIThemeEnum int
|
||||
|
||||
const (
|
||||
ThemeDefault UIThemeEnum = 0 // 默认主题
|
||||
ThemeNewYear UIThemeEnum = 1 // 新春主题
|
||||
)
|
||||
Reference in New Issue
Block a user