26 lines
626 B
Go
26 lines
626 B
Go
package mail
|
||
|
||
import (
|
||
"fmt"
|
||
|
||
coremodule "ops-assistant/internal/core/module"
|
||
)
|
||
|
||
func commandSpecs() []coremodule.CommandSpec {
|
||
return []coremodule.CommandSpec{
|
||
{
|
||
Prefixes: []string{"/mail status"},
|
||
Template: coremodule.CommandTemplate{
|
||
RunbookName: "mail_status",
|
||
Gate: coremodule.Gate{
|
||
NeedFlag: "enable_module_mail",
|
||
AllowDryRun: true,
|
||
},
|
||
DryRunMsg: "🧪 dry-run: 将执行 /mail status(未实际执行)",
|
||
SuccessMsg: func(jobID uint) string { return fmt.Sprintf("✅ /mail status 已执行,job=%d", jobID) },
|
||
},
|
||
ErrPrefix: "/mail status 执行失败: ",
|
||
},
|
||
}
|
||
}
|