feat(internal/github): 触发时公开github遗言仓库
This commit is contained in:
+17
-10
@@ -6,16 +6,17 @@ import (
|
||||
)
|
||||
|
||||
type Config struct {
|
||||
Debug bool `json:"debug"`
|
||||
DisconnectDuration int `json:"disconnect_duration"` // Hours
|
||||
CatBotUrl string `json:"cat_bot_url"`
|
||||
CatBotKey string `json:"cat_bot_key"`
|
||||
QQSendGroup []int `json:"qq_send_group"`
|
||||
QQMsg string `json:"qq_msg"`
|
||||
MailList []string `json:"mail_list"`
|
||||
MailTitle string `json:"mail_title"`
|
||||
SMTPConfig SMTPConfig `json:"smtp_config"`
|
||||
MailContent string `json:"mail_content"`
|
||||
Debug bool `json:"debug"`
|
||||
DisconnectDuration int `json:"disconnect_duration"` // Hours
|
||||
CatBotUrl string `json:"cat_bot_url"`
|
||||
CatBotKey string `json:"cat_bot_key"`
|
||||
QQSendGroup []int `json:"qq_send_group"`
|
||||
QQMsg string `json:"qq_msg"`
|
||||
MailList []string `json:"mail_list"`
|
||||
MailTitle string `json:"mail_title"`
|
||||
SMTPConfig SMTPConfig `json:"smtp_config"`
|
||||
MailContent string `json:"mail_content"`
|
||||
GithubConfig GithubConfig `json:"github_config"`
|
||||
}
|
||||
|
||||
type SMTPConfig struct {
|
||||
@@ -25,6 +26,12 @@ type SMTPConfig struct {
|
||||
Password string `json:"pass"`
|
||||
}
|
||||
|
||||
type GithubConfig struct {
|
||||
Owner string `json:"owner"`
|
||||
Repos []string `json:"repos"`
|
||||
Token string `json:"token"`
|
||||
}
|
||||
|
||||
func GetConfig() (config Config, err error) {
|
||||
content, err := os.ReadFile("config.json")
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user