初始化项目
This commit is contained in:
@@ -1 +1,34 @@
|
||||
package consts
|
||||
|
||||
// 广告管理错误码
|
||||
const (
|
||||
ErrAdNotFound = 1001 // 广告不存在
|
||||
ErrAdStatusInvalid = 1002 // 广告状态无效
|
||||
ErrAdAuditedRejected = 1003 // 广告审核被拒绝
|
||||
ErrAdBudgetInsufficient = 1004 // 广告预算不足
|
||||
)
|
||||
|
||||
// 广告主管理错误码
|
||||
const (
|
||||
ErrAdvertiserNotFound = 2001 // 广告主不存在
|
||||
ErrAdvertiserStatusInvalid = 2002 // 广告主状态无效
|
||||
ErrAdvertiserAuditedRejected = 2003 // 广告主审核被拒绝
|
||||
ErrAdvertiserBalanceLow = 2004 // 广告主余额不足
|
||||
ErrCreditLimitInvalid = 2005 // 授信额度无效
|
||||
)
|
||||
|
||||
// 广告位管理错误码
|
||||
const (
|
||||
ErrAdPositionNotFound = 3001 // 广告位不存在
|
||||
ErrAdPositionStatusInvalid = 3002 // 广告位状态无效
|
||||
ErrAdPositionCodeExists = 3003 // 广告位编码已存在
|
||||
ErrAdNotMatched = 3004 // 无匹配广告
|
||||
)
|
||||
|
||||
// 报表管理错误码
|
||||
const (
|
||||
ErrReportNotFound = 4001 // 报表不存在
|
||||
ErrReportNotGenerated = 4002 // 报表未生成
|
||||
ErrReportExpired = 4003 // 报表已过期
|
||||
ErrReportInvalidFormat = 4004 // 报表格式无效
|
||||
)
|
||||
|
||||
@@ -1 +1,48 @@
|
||||
package consts
|
||||
|
||||
// 广告系统Redis键定义
|
||||
|
||||
// 广告缓存键
|
||||
const (
|
||||
AdCacheKeyPrefix = "cid:ad:" // 广告缓存前缀
|
||||
AdPositionCacheKeyPrefix = "cid:pos:" // 广告位缓存前缀
|
||||
AdvertiserCacheKeyPrefix = "cid:adv:" // 广告主缓存前缀
|
||||
)
|
||||
|
||||
// 统计数据键
|
||||
const (
|
||||
AdStatKeyPrefix = "cid:stat:ad:" // 广告统计键前缀
|
||||
AdvStatKeyPrefix = "cid:stat:adv:" // 广告主统计键前缀
|
||||
PosStatKeyPrefix = "cid:stat:pos:" // 广告位统计键前缀
|
||||
DailyStatKeyPrefix = "cid:stat:daily:" // 日常统计键前缀
|
||||
)
|
||||
|
||||
// 广告匹配键
|
||||
const (
|
||||
AdMatchingKeyPrefix = "cid:match:" // 广告匹配键前缀
|
||||
UserProfileKeyPrefix = "cid:user:" // 用户画像键前缀
|
||||
)
|
||||
|
||||
// 报表键
|
||||
const (
|
||||
ReportCacheKeyPrefix = "cid:report:" // 报表缓存键前缀
|
||||
ReportTaskKeyPrefix = "cid:task:" // 报表任务键前缀
|
||||
)
|
||||
|
||||
// 限流键
|
||||
const (
|
||||
AdRequestLimitKeyPrefix = "cid:limit:req:" // 广告请求限流键前缀
|
||||
ApiRequestLimitKeyPrefix = "cid:limit:api:" // API请求限流键前缀
|
||||
)
|
||||
|
||||
// 队列键
|
||||
const (
|
||||
AdStatisticsQueueKey = "cid:queue:stat" // 统计数据队列
|
||||
ReportGenerateQueueKey = "cid:queue:report" // 报表生成队列
|
||||
)
|
||||
|
||||
// Stream键
|
||||
const (
|
||||
AdEventStreamKey = "cid:stream:ad_event" // 广告事件流
|
||||
UserBehaviorStreamKey = "cid:stream:user_behavior" // 用户行为流
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user