Documentation
¶
Overview ¶
* @Author: NyanCatda * @Date: 2022-01-24 19:35:15 * @LastEditTime: 2022-03-07 19:48:36 * @LastEditors: NyanCatda * @Description: 配置文件结构体 * @FilePath: \ShionBot\Utils\ReadConfig\ConfigStruct.go
* @Author: NyanCatda * @Date: 2021-10-03 04:14:10 * @LastEditTime: 2022-03-07 19:50:26 * @LastEditors: NyanCatda * @Description: 读取配置文件 * @FilePath: \ShionBot\Utils\ReadConfig\ReadConfig.go
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( GetConfig *Config ConfigPath string )
Functions ¶
func GetWikiLink ¶
func GetWikiLink(SNSName string, Messagejson Struct.WebHookJson, WikiName string) string
*
- @description: 读取Wiki名字对应的Wiki链接
- @param {string} SNSName 聊天软件名字
- @param {Struct.WebHookJson} Messagejson 消息Json
- @param {string} WikiName Wiki名字
- @return {*}
Types ¶
type Config ¶
type Config struct {
Run struct {
WebHookPort string `yaml:"WebHookPort"`
WebHookKey string `yaml:"WebHookKey"`
Language string `yaml:"Language"`
} `yaml:"Run"`
SNS struct {
QQ struct {
Switch bool `yaml:"Switch"`
APILink string `yaml:"APILink"`
BotQQNumber int `yaml:"BotQQNumber"`
VerifyKey string `yaml:"VerifyKey"`
} `yaml:"QQ"`
Telegram struct {
Switch bool `yaml:"Switch"`
Token string `yaml:"Token"`
BotAPILink string `yaml:"BotAPILink"`
} `yaml:"Telegram"`
Line struct {
Switch bool `yaml:"Switch"`
ChannelAccessToken string `yaml:"ChannelAccessToken"`
BotAPILink string `yaml:"BotAPILink"`
} `yaml:"Line"`
KaiHeiLa struct {
Switch bool `yaml:"Switch"`
Token string `yaml:"Token"`
} `yaml:"KaiHeiLa"`
} `yaml:"SNS"`
Wiki []struct {
WikiName string `yaml:"WikiName"`
WikiLink string `yaml:"WikiLink"`
} `yaml:"Wiki"`
}
Click to show internal directories.
Click to hide internal directories.