feat: v2(Incomplete,very early version)
This commit is contained in:
+7
-45
@@ -5,52 +5,14 @@ import (
|
||||
"os"
|
||||
)
|
||||
|
||||
// type DingtalkBot struct {
|
||||
// AccessToken string `json:"access_token"`
|
||||
// Secret string `json:"secret"`
|
||||
// }
|
||||
|
||||
type Config struct {
|
||||
SignalSecret string `json:"signal_secret"`
|
||||
Debug bool `json:"debug"`
|
||||
DisconnectDuration int `json:"disconnect_duration"` // Hours
|
||||
BiliMsg string `json:"bili_msg"`
|
||||
Basic Basic `json:"basic"`
|
||||
MailConfig MailConfig `json:"mail_config"`
|
||||
GithubConfig GithubConfig `json:"github_config"`
|
||||
DingtalkBot DingtalkBot `json:"dingtalk_bot"`
|
||||
OneBotConfig OneBotConfig `json:"onebot_config"`
|
||||
}
|
||||
|
||||
type MailConfig struct {
|
||||
Host string `json:"host"`
|
||||
Port int `json:"port"`
|
||||
User string `json:"user"`
|
||||
Password string `json:"pass"`
|
||||
MailList []string `json:"mail_list"`
|
||||
MailTitle string `json:"mail_title"`
|
||||
MailContent string `json:"mail_content"`
|
||||
}
|
||||
|
||||
type GithubConfig struct {
|
||||
Owner string `json:"owner"`
|
||||
Repos []string `json:"repos"`
|
||||
Token string `json:"token"`
|
||||
}
|
||||
|
||||
type Basic struct {
|
||||
Name string `json:"name"`
|
||||
Age int `json:"age"`
|
||||
NickName string `json:"nickname"`
|
||||
QQNumber string `json:"qq_number"`
|
||||
CauseStop string `json:"cause_stop"`
|
||||
}
|
||||
|
||||
type DingtalkBot struct {
|
||||
AccessToken string `json:"access_token"`
|
||||
Secret string `json:"secret"`
|
||||
}
|
||||
|
||||
type OneBotConfig struct {
|
||||
URL string `json:"url"` // 例如 "http://localhost:5700"
|
||||
Token string `json:"token"`
|
||||
SendGroups []int `json:"send_groups"`
|
||||
Msg string `json:"msg"`
|
||||
EnableRegistry bool `json:"enable_registry"`
|
||||
TimeoutDurationHours int `json:"timeout_duration_hours"`
|
||||
}
|
||||
|
||||
// Get config from json file
|
||||
|
||||
Reference in New Issue
Block a user