Dockerfile
This commit is contained in:
18
consts/data/api_method.go
Normal file
18
consts/data/api_method.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package data
|
||||
|
||||
// ApiMethod 接口请求方法
|
||||
type ApiMethod string
|
||||
|
||||
const (
|
||||
ApiMethodGet ApiMethod = "GET" // GET请求
|
||||
ApiMethodPost ApiMethod = "POST" // POST请求
|
||||
ApiMethodPut ApiMethod = "PUT" // PUT请求
|
||||
ApiMethodDelete ApiMethod = "DELETE" // DELETE请求
|
||||
ApiMethodPatch ApiMethod = "PATCH" // PATCH请求
|
||||
ApiMethodHead ApiMethod = "HEAD" // HEAD请求
|
||||
ApiMethodOptions ApiMethod = "OPTIONS" // OPTIONS请求
|
||||
)
|
||||
|
||||
func (m ApiMethod) String() string {
|
||||
return string(m)
|
||||
}
|
||||
16
consts/data/fetch_status.go
Normal file
16
consts/data/fetch_status.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package data
|
||||
|
||||
// FetchStatus 数据获取状态
|
||||
type FetchStatus string
|
||||
|
||||
const (
|
||||
FetchStatusPending FetchStatus = "pending" // 待执行
|
||||
FetchStatusRunning FetchStatus = "running" // 执行中
|
||||
FetchStatusSuccess FetchStatus = "success" // 成功
|
||||
FetchStatusFailed FetchStatus = "failed" // 失败
|
||||
FetchStatusRateLimit FetchStatus = "rate_limit" // 触发限流
|
||||
)
|
||||
|
||||
func (f FetchStatus) String() string {
|
||||
return string(f)
|
||||
}
|
||||
14
consts/data/limit_type.go
Normal file
14
consts/data/limit_type.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package data
|
||||
|
||||
// LimitType 限流类型
|
||||
type LimitType string
|
||||
|
||||
const (
|
||||
LimitTypeApp LimitType = "app" // 应用维度限流
|
||||
LimitTypeTenant LimitType = "tenant" // 租户维度限流
|
||||
LimitTypeApi LimitType = "api" // 接口维度限流
|
||||
)
|
||||
|
||||
func (l LimitType) String() string {
|
||||
return string(l)
|
||||
}
|
||||
13
consts/data/platform_status.go
Normal file
13
consts/data/platform_status.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package data
|
||||
|
||||
// PlatformStatus 平台状态
|
||||
type PlatformStatus string
|
||||
|
||||
const (
|
||||
PlatformStatusActive PlatformStatus = "active" // 启用
|
||||
PlatformStatusInactive PlatformStatus = "inactive" // 停用
|
||||
)
|
||||
|
||||
func (s PlatformStatus) String() string {
|
||||
return string(s)
|
||||
}
|
||||
21
consts/data/platform_type.go
Normal file
21
consts/data/platform_type.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package data
|
||||
|
||||
// SyncPlatform 同步平台类型
|
||||
type SyncPlatform string
|
||||
|
||||
const (
|
||||
PlatformTaobao SyncPlatform = "taobao" // 淘宝
|
||||
PlatformJD SyncPlatform = "jd" // 京东
|
||||
PlatformKuaishou SyncPlatform = "kuaishou" // 快手
|
||||
PlatformDouyin SyncPlatform = "douyin" // 抖音
|
||||
PlatformXhs SyncPlatform = "xhs" // 小红书
|
||||
PlatformPdd SyncPlatform = "pdd" // 拼多多
|
||||
PlatformXianyu SyncPlatform = "xianyu" // 闲鱼
|
||||
PlatformTmall SyncPlatform = "tmall" // 天猫
|
||||
PlatformWechat SyncPlatform = "wechat" // 微信
|
||||
PlatformCustom SyncPlatform = "custom" // 自定义平台
|
||||
)
|
||||
|
||||
func (s SyncPlatform) String() string {
|
||||
return string(s)
|
||||
}
|
||||
Reference in New Issue
Block a user