feat: mqtt receive.

This commit is contained in:
2026-04-28 15:29:16 +08:00
parent 51871c352a
commit 2464617599
9 changed files with 2820 additions and 2 deletions
+15 -2
View File
@@ -26,9 +26,22 @@ type AIConfig struct {
Model string `mapstructure:"model" yaml:"model"`
}
type MQTTConfig struct {
Enabled bool `mapstructure:"enabled" yaml:"enabled"`
Host string `mapstructure:"host" yaml:"host"`
Port int `mapstructure:"port" yaml:"port"`
Username string `mapstructure:"username" yaml:"username"`
Password string `mapstructure:"password" yaml:"password"`
ClientIDPrefix string `mapstructure:"client_id_prefix" yaml:"client_id_prefix"`
Region string `mapstructure:"region" yaml:"region"`
UseTLS bool `mapstructure:"use_tls" yaml:"use_tls"`
QoS int `mapstructure:"qos" yaml:"qos"`
}
type AppConfig struct {
DB DBConfig `mapstructure:"database" yaml:"database"`
AI AIConfig `mapstructure:"ai" yaml:"ai"`
DB DBConfig `mapstructure:"database" yaml:"database"`
AI AIConfig `mapstructure:"ai" yaml:"ai"`
MQTT MQTTConfig `mapstructure:"mqtt" yaml:"mqtt"`
}
func InitConfig() {