feat: 升级 samber/do v1 → v2

This commit is contained in:
2026-05-15 09:04:12 +08:00
parent 7741f7584d
commit 9ad5d25836
47 changed files with 1456 additions and 684 deletions
+25
View File
@@ -0,0 +1,25 @@
package base
// CondflowDecisionAction 执行器动作定义
type CondflowDecisionAction struct {
Name string `db:"name" json:"name"`
Code string `db:"code" json:"code"`
ConfigSchema SchemaParams `db:"config_schema" json:"config_schema"` // 配置项Schema定义
ParamsSchema SchemaParams `db:"params_schema" json:"params_schema"` // 参数Schema定义
ResourceUuid string `db:"resource_uuid" json:"resource_uuid"`
Comment string `db:"comment" json:"comment"`
}
// CondflowDecision 执行器注册表
type CondflowDecision struct {
Uuid string `db:"uuid" json:"uuid"`
ResourceUuid string `db:"resource_uuid" json:"resource_uuid"`
Name string `db:"name" json:"name"`
Code string `db:"code" json:"code"`
Comment string `db:"comment" json:"comment"`
Actions []CondflowDecisionAction `db:"actions" json:"actions"`
CreatedAt string `db:"created_at" json:"created_at"`
UpdatedAt string `db:"updated_at" json:"updated_at"`
}
type GetCondflowDecision func(code string) (CondflowDecision, bool)