feat: mqtt receive.
This commit is contained in:
+15
-2
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user