feat: 钉钉机器人通知

This commit is contained in:
mei
2026-01-18 10:02:37 +08:00
parent 71d0e095c8
commit 755d4f0369
8 changed files with 55 additions and 23 deletions
+6 -1
View File
@@ -21,7 +21,7 @@ type Config struct {
MailContent string `json:"mail_content"`
GithubConfig GithubConfig `json:"github_config"`
BiliMsg string `json:"bili_msg"`
BiliWarnAddress string `json:"bili_warn_address"`
DingtalkBot DingtalkBot `json:"dingtalk_bot"`
}
type SMTPConfig struct {
@@ -45,6 +45,11 @@ type Basic struct {
CauseStop string `json:"cause_stop"`
}
type DingtalkBot struct {
AccessToken string `json:"access_token"`
Secret string `json:"secret"`
}
// Get config from json file
func GetConfig() (config Config, err error) {
content, err := os.ReadFile("config.json")