Documentation ¶
Overview ¶
Package config 包含go-cqhttp操作配置文件的相关函数
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultConfigFile = path.Join(currentPath, "config.yml")
DefaultConfigFile 默认配置文件路径
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Account struct { Uin int64 `yaml:"uin"` Password string `yaml:"password"` Encrypt bool `yaml:"encrypt"` Status int32 `yaml:"status"` ReLogin struct { Disabled bool `yaml:"disabled"` Delay uint `yaml:"delay"` MaxTimes uint `yaml:"max-times"` Interval int `yaml:"interval"` } UseSSOAddress bool `yaml:"use-sso-address"` } `yaml:"account"` Heartbeat struct { Disabled bool `yaml:"disabled"` Interval int `yaml:"interval"` } `yaml:"heartbeat"` Message struct { PostFormat string `yaml:"post-format"` IgnoreInvalidCQCode bool `yaml:"ignore-invalid-cqcode"` ForceFragment bool `yaml:"force-fragment"` FixURL bool `yaml:"fix-url"` ProxyRewrite string `yaml:"proxy-rewrite"` ReportSelfMessage bool `yaml:"report-self-message"` RemoveReplyAt bool `yaml:"remove-reply-at"` ExtraReplyData bool `yaml:"extra-reply-data"` } `yaml:"message"` Output struct { LogLevel string `yaml:"log-level"` Debug bool `yaml:"debug"` } `yaml:"output"` Servers []map[string]yaml.Node `yaml:"servers"` Database map[string]yaml.Node `yaml:"database"` }
Config 总配置文件
type HTTPServer ¶
type HTTPServer struct { Disabled bool `yaml:"disabled"` Host string `yaml:"host"` Port int `yaml:"port"` Timeout int32 `yaml:"timeout"` Post []struct { URL string `yaml:"url"` Secret string `yaml:"secret"` } MiddleWares `yaml:"middlewares"` }
HTTPServer HTTP通信相关配置
type LevelDBConfig ¶
type LevelDBConfig struct {
Enable bool `yaml:"enable"`
}
LevelDBConfig leveldb 相关配置
type MiddleWares ¶
type MiddleWares struct { AccessToken string `yaml:"access-token"` Filter string `yaml:"filter"` RateLimit struct { Enabled bool `yaml:"enabled"` Frequency float64 `yaml:"frequency"` Bucket int `yaml:"bucket"` } `yaml:"rate-limit"` }
MiddleWares 通信中间件
type PprofServer ¶
type PprofServer struct { Disabled bool `yaml:"disabled"` Host string `yaml:"host"` Port int `yaml:"port"` }
PprofServer pprof性能分析服务器相关配置
type WebsocketReverse ¶
type WebsocketReverse struct { Disabled bool `yaml:"disabled"` Universal string `yaml:"universal"` API string `yaml:"api"` Event string `yaml:"event"` ReconnectInterval int `yaml:"reconnect-interval"` MiddleWares `yaml:"middlewares"` }
WebsocketReverse 反向WS相关配置
type WebsocketServer ¶
type WebsocketServer struct { Disabled bool `yaml:"disabled"` Host string `yaml:"host"` Port int `yaml:"port"` MiddleWares `yaml:"middlewares"` }
WebsocketServer 正向WS相关配置
Click to show internal directories.
Click to hide internal directories.