feat: 钉钉机器人通知
This commit is contained in:
+6
-1
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user