feat(drivers): add alidns delete record
Quality check / Web UI (push) Successful in 9m14s

This commit is contained in:
mei
2026-08-30 16:03:32 +08:00
parent 74ff904598
commit 59cf99ae22
15 changed files with 1412 additions and 48 deletions
+1 -3
View File
@@ -12,9 +12,7 @@ import (
// RainyunAccountConfigValidator Rainyun账号配置验证器
type RainyunAccountConfigValidator struct{}
func (v *RainyunAccountConfigValidator) GetType() string {
return AccountType
}
func (v *RainyunAccountConfigValidator) GetType() string { return AccountType }
func (v *RainyunAccountConfigValidator) Validate(config string) error {
// 解析配置
+3 -2
View File
@@ -3,8 +3,9 @@ package rainyun
const (
// AccountType Rainyun 账号类型标识
AccountType = "rainyun"
// RuleType 发送 Rainyun 消息的规则类型标识
RuleType = "rainyun-workorder"
// RuleTypeWorkOrder 发送 Rainyun 工单消息的规则类型标识
RuleTypeWorkOrder = "rainyun-workorder"
RuleTypeRunAway = "rainyun-runaway"
)
type RainyunWorkOrderRule struct {
+4 -4
View File
@@ -11,7 +11,7 @@ import (
type RainyunWorkorderRuleValidator struct{}
func (v *RainyunWorkorderRuleValidator) GetType() string {
return RuleType
return RuleTypeWorkOrder
}
func (v *RainyunWorkorderRuleValidator) Validate(configJSON string) error {
@@ -33,7 +33,7 @@ func (v *RainyunWorkorderRuleValidator) Validate(configJSON string) error {
func (v *RainyunWorkorderRuleValidator) Meta() meta.RuleMeta {
return meta.RuleMeta{
Type: RuleType,
Type: RuleTypeWorkOrder,
Label: "发送雨云工单",
Description: "触发时发送雨云工单",
AccountType: AccountType,
@@ -47,7 +47,7 @@ func (v *RainyunWorkorderRuleValidator) Meta() meta.RuleMeta {
type RainyunRunAwayRuleValidator struct{}
func (v *RainyunRunAwayRuleValidator) GetType() string {
return "rainyun-runaway"
return RuleTypeRunAway
}
func (v *RainyunRunAwayRuleValidator) Validate(configJSON string) error {
@@ -65,7 +65,7 @@ func (v *RainyunRunAwayRuleValidator) Validate(configJSON string) error {
func (v *RainyunRunAwayRuleValidator) Meta() meta.RuleMeta {
return meta.RuleMeta{
Type: "rainyun-runaway",
Type: RuleTypeRunAway,
Label: "重置雨云账号中所有云服务器(一键跑路)",
Description: "触发时会重装雨云账号下所有云服务器来实现跑路",
AccountType: AccountType,
+2 -2
View File
@@ -11,7 +11,7 @@ import (
type RainyunWorkorderExecutor struct{}
func (e *RainyunWorkorderExecutor) GetType() string {
return RuleType
return RuleTypeWorkOrder
}
func (e *RainyunWorkorderExecutor) Execute(ctx context.Context, rule *model.Rule) error {
@@ -24,7 +24,7 @@ func (e *RainyunWorkorderExecutor) Execute(ctx context.Context, rule *model.Rule
type RainyunRunAwayExecutor struct{}
func (e *RainyunRunAwayExecutor) GetType() string {
return "rainyun-runaway"
return RuleTypeRunAway
}
func (e *RainyunRunAwayExecutor) Execute(ctx context.Context, rule *model.Rule) error {