opt: standard upf output

This commit is contained in:
2024-04-16 16:32:24 +08:00
parent 7a70d76eb2
commit 18e6b0ed8d
5 changed files with 56 additions and 26 deletions

View File

@@ -11,17 +11,6 @@ import (
"gopkg.in/yaml.v3"
)
type DbConfig struct {
Type string `yaml:"type"`
User string `yaml:"user"`
Password string `yaml:"password"`
Host string `yaml:"host"`
Port string `yaml:"port"`
Name string `yaml:"name"`
ConnParam string `yaml:"connParam,omitempty"`
Backup string `yaml:"backup"`
}
// Yaml struct of config
type YamlConfig struct {
Logger struct {
@@ -110,16 +99,7 @@ type YamlConfig struct {
} `yaml:"smsc"`
} `yaml:"alarm"`
MML struct {
Port int `yaml:"port"`
Port2 int `yaml:"port2"`
Sleep int64 `yaml:"sleep"`
DeadLine int64 `yaml:"deadLine"`
User string `yaml:"user"`
Password string `ymal:"password"`
MmlHome string `yaml:"mmlHome"`
Upload string `yaml:"upload"`
} `yaml:"mml"`
MML MMLParam `yaml:"mml"`
NE struct {
Addr string `yaml:"addr"`
@@ -171,6 +151,31 @@ type RestParam struct {
KeyFile string `yaml:"keyFile"`
}
type DbConfig struct {
Type string `yaml:"type"`
User string `yaml:"user"`
Password string `yaml:"password"`
Host string `yaml:"host"`
Port string `yaml:"port"`
Name string `yaml:"name"`
ConnParam string `yaml:"connParam,omitempty"`
Backup string `yaml:"backup"`
}
type MMLParam struct {
Port int `yaml:"port"`
Port2 int `yaml:"port2"`
Sleep int64 `yaml:"sleep"`
DeadLine int64 `yaml:"deadLine"`
SizeRow byte `yaml:"sizeRow"`
SizeCol byte `yaml:"sizeCol"`
BufferSize int `yaml:"bufferSize"`
User string `yaml:"user"`
Password string `ymal:"password"`
MmlHome string `yaml:"mmlHome"`
Upload string `yaml:"upload"`
}
type TestDatas struct {
UDM struct {
CapUsed uint32 `yaml:"capUsed"`
@@ -211,6 +216,11 @@ func NewYamlConfig() YamlConfig {
Type: "mysql",
ConnParam: "charset=utf8mb4&collation=utf8mb4_general_ci&parseTime=True&interpolateParams=True",
},
MML: MMLParam{
SizeRow: 100,
SizeCol: 128,
BufferSize: 65535,
},
}
}