重构数据引擎和报表引擎
This commit is contained in:
@@ -1,13 +1,10 @@
|
||||
package api_feature
|
||||
|
||||
// AppStatus 应用状态
|
||||
type AppStatus string
|
||||
// ApplicationStatus 应用状态(暂未使用,保留供未来扩展)
|
||||
type ApplicationStatus string
|
||||
|
||||
const (
|
||||
AppStatusActive AppStatus = "active" // 启用
|
||||
AppStatusInactive AppStatus = "inactive" // 停用
|
||||
ApplicationStatusPending ApplicationStatus = "pending"
|
||||
ApplicationStatusApproved ApplicationStatus = "approved"
|
||||
ApplicationStatusRejected ApplicationStatus = "rejected"
|
||||
)
|
||||
|
||||
func (s AppStatus) String() string {
|
||||
return string(s)
|
||||
}
|
||||
|
||||
@@ -1,17 +1,10 @@
|
||||
package api_feature
|
||||
|
||||
// AppType 应用类型
|
||||
type AppType string
|
||||
// ApplicationType 应用类型(暂未使用,保留供未来扩展)
|
||||
type ApplicationType string
|
||||
|
||||
const (
|
||||
AppTypeWeb AppType = "web" // Web应用
|
||||
AppTypeMobile AppType = "mobile" // 移动应用
|
||||
AppTypeMiniApp AppType = "mini_app" // 小程序
|
||||
AppTypeH5 AppType = "h5" // H5应用
|
||||
AppTypeDesktop AppType = "desktop" // 桌面应用
|
||||
AppTypeThirdParty AppType = "third_party" // 第三方应用
|
||||
ApplicationTypeAPI ApplicationType = "api"
|
||||
ApplicationTypeWebhook ApplicationType = "webhook"
|
||||
ApplicationTypeSDK ApplicationType = "sdk"
|
||||
)
|
||||
|
||||
func (s AppType) String() string {
|
||||
return string(s)
|
||||
}
|
||||
|
||||
@@ -1,16 +1,11 @@
|
||||
package api_feature
|
||||
|
||||
// FetchStatus 数据获取状态
|
||||
// FetchStatus 数据拉取状态(暂未使用,保留供未来扩展)
|
||||
type FetchStatus string
|
||||
|
||||
const (
|
||||
FetchStatusPending FetchStatus = "pending" // 待执行
|
||||
FetchStatusRunning FetchStatus = "running" // 执行中
|
||||
FetchStatusSuccess FetchStatus = "success" // 成功
|
||||
FetchStatusFailed FetchStatus = "failed" // 失败
|
||||
FetchStatusRateLimit FetchStatus = "rate_limit" // 触发限流
|
||||
FetchStatusPending FetchStatus = "pending"
|
||||
FetchStatusRunning FetchStatus = "running"
|
||||
FetchStatusCompleted FetchStatus = "completed"
|
||||
FetchStatusFailed FetchStatus = "failed"
|
||||
)
|
||||
|
||||
func (f FetchStatus) String() string {
|
||||
return string(f)
|
||||
}
|
||||
|
||||
@@ -1,14 +1,9 @@
|
||||
package api_feature
|
||||
|
||||
// LimitType 限流类型
|
||||
// LimitType 限流类型(暂未使用,保留供未来扩展)
|
||||
type LimitType string
|
||||
|
||||
const (
|
||||
LimitTypeApp LimitType = "app" // 应用维度限流
|
||||
LimitTypeTenant LimitType = "tenant" // 租户维度限流
|
||||
LimitTypeApi LimitType = "api" // 接口维度限流
|
||||
LimitTypeRate LimitType = "rate"
|
||||
LimitTypeBurst LimitType = "burst"
|
||||
)
|
||||
|
||||
func (l LimitType) String() string {
|
||||
return string(l)
|
||||
}
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
package api_feature
|
||||
|
||||
// MappingStatus 映射状态
|
||||
// MappingStatus 字段映射状态(暂未使用,保留供未来扩展)
|
||||
type MappingStatus string
|
||||
|
||||
const (
|
||||
MappingStatusActive MappingStatus = "active" // 启用
|
||||
MappingStatusInactive MappingStatus = "inactive" // 停用
|
||||
MappingStatusMapped MappingStatus = "mapped"
|
||||
MappingStatusUnmapped MappingStatus = "unmapped"
|
||||
)
|
||||
|
||||
func (s MappingStatus) String() string {
|
||||
return string(s)
|
||||
}
|
||||
|
||||
@@ -1,21 +1,11 @@
|
||||
package api_feature
|
||||
|
||||
// SyncPlatform 同步平台类型
|
||||
type SyncPlatform string
|
||||
// PlatformType 平台类型(暂未使用,保留供未来扩展)
|
||||
type PlatformType 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" // 自定义平台
|
||||
PlatformTypeAds PlatformType = "ads"
|
||||
PlatformTypeEcom PlatformType = "ecom"
|
||||
PlatformTypeSocial PlatformType = "social"
|
||||
PlatformTypeDingTalk PlatformType = "dingtalk"
|
||||
)
|
||||
|
||||
func (s SyncPlatform) String() string {
|
||||
return string(s)
|
||||
}
|
||||
|
||||
@@ -1,16 +1,13 @@
|
||||
package api_feature
|
||||
|
||||
// TransformType 转换类型
|
||||
// TransformType 字段转换类型(暂未使用,保留供未来扩展)
|
||||
type TransformType string
|
||||
|
||||
const (
|
||||
TransformTypeFixed TransformType = "fixed" // 固定值
|
||||
TransformTypeMapping TransformType = "mapping" // 值映射
|
||||
TransformTypeRegex TransformType = "regex" // 正则转换
|
||||
TransformTypeFunction TransformType = "function" // 函数转换
|
||||
TransformTypeScript TransformType = "script" // 脚本转换
|
||||
TransformTypeDirect TransformType = "direct"
|
||||
TransformTypeFormatDate TransformType = "formatDate"
|
||||
TransformTypeMapValue TransformType = "mapValue"
|
||||
TransformTypeConcat TransformType = "concat"
|
||||
TransformTypeCalc TransformType = "calc"
|
||||
TransformTypeRegex TransformType = "regex"
|
||||
)
|
||||
|
||||
func (t TransformType) String() string {
|
||||
return string(t)
|
||||
}
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
package dict
|
||||
|
||||
// 转换类型
|
||||
// 注意:请不要在此文件添加与 consts/api-feature 包重复的类型定义。
|
||||
// PlatformStatus 和 ApiMethod 等类型已在 dataengine/consts/api-feature 中定义,
|
||||
// 请使用 api_feature.PlatformStatus / api_feature.ApiMethod 替代。
|
||||
|
||||
// Package dict 仅提供该包特有时使用。
|
||||
|
||||
// 转换类型(暂未使用,保留供未来扩展)
|
||||
const (
|
||||
TransformTypeDirect = "direct" // 直接映射
|
||||
TransformTypeFormatDate = "formatDate" // 日期格式化
|
||||
@@ -10,7 +16,7 @@ const (
|
||||
TransformTypeRegex = "regex" // 正则提取
|
||||
)
|
||||
|
||||
// 业务域
|
||||
// 业务域(暂未使用,保留供未来扩展)
|
||||
const (
|
||||
BusinessDomainUser = "user" // 用户
|
||||
BusinessDomainOrder = "order" // 订单
|
||||
@@ -18,7 +24,7 @@ const (
|
||||
BusinessDomainPayment = "payment" // 支付
|
||||
)
|
||||
|
||||
// 字段类型
|
||||
// 字段类型(暂未使用,保留供未来扩展)
|
||||
const (
|
||||
FieldTypeString = "string"
|
||||
FieldTypeNumber = "number"
|
||||
@@ -30,22 +36,3 @@ const (
|
||||
FieldTypeTime = "time"
|
||||
FieldTypeDateTime = "datetime"
|
||||
)
|
||||
|
||||
// 平台状态
|
||||
type PlatformStatus string
|
||||
|
||||
const (
|
||||
PlatformStatusActive PlatformStatus = "active"
|
||||
PlatformStatusInactive PlatformStatus = "inactive"
|
||||
)
|
||||
|
||||
// 接口方法
|
||||
type ApiMethod string
|
||||
|
||||
const (
|
||||
ApiMethodGET ApiMethod = "GET"
|
||||
ApiMethodPOST ApiMethod = "POST"
|
||||
ApiMethodPUT ApiMethod = "PUT"
|
||||
ApiMethodDELETE ApiMethod = "DELETE"
|
||||
ApiMethodPATCH ApiMethod = "PATCH"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user