| | |
| | | import ( |
| | | "apsClient/pkg/convertx" |
| | | "apsClient/pkg/logx" |
| | | "apsClient/pkg/redisx" |
| | | "apsClient/pkg/sqlitex" |
| | | "github.com/spf13/viper" |
| | | "log" |
| | |
| | | System struct { |
| | | Env string // 环境值 develop test public |
| | | Port int // 端口 |
| | | DbType string // 数据库类型 |
| | | UseMultipoint bool // 多点登录拦截 |
| | | UseRedis bool // 使用redis |
| | | LimitCountIP int |
| | | LimitTimeIP int |
| | | RouterPrefix string // 路由前缀 |
| | | SudoPassword string // sudo密码 |
| | | DeviceId string //设备id |
| | | NetSetShellPath string //网络设置脚本路径 |
| | | NetUpShellName string //网络停用脚本 |
| | |
| | | NsqlookupdAddr string |
| | | } |
| | | |
| | | PLCAddressItem struct { |
| | | FieldName string |
| | | Address int |
| | | } |
| | | |
| | | config struct { |
| | | // 系统配置 |
| | | System System |
| | |
| | | // mysql配置 |
| | | Sqlite sqlitex.Conf |
| | | |
| | | // redis配置 |
| | | Redis redisx.Conf |
| | | |
| | | // etcd配置 |
| | | Etcd Etcd |
| | | |
| | | // rancher配置 |
| | | Rancher Rancher |
| | | |
| | | // k8s配置 |
| | | K8s K8s |
| | | |
| | | //Services Address |
| | | Services Services |
| | | |
| | | //NsqConf |
| | | NsqConf nsqConf |
| | | |
| | | //PLC write address |
| | | PLCAddresses []PLCAddressItem |
| | | } |
| | | ) |
| | | |
| | |
| | | log.Println("......................................................") |
| | | log.Printf(" System: %+v", Conf.System) |
| | | log.Printf(" Log: %+v", Conf.Log) |
| | | log.Printf(" etcd: %+v", Conf.Etcd) |
| | | log.Printf(" rancher: %+v", Conf.Rancher) |
| | | log.Printf(" k8s: %+v", Conf.K8s) |
| | | log.Printf(" plc address: %+v", Conf.PLCAddresses) |
| | | log.Println("......................................................") |
| | | } |