| | |
| | | TopHitsSize int `mapstructure: "topHitsSize"` |
| | | CameraSize int `mapstructure: "cameraSize"` |
| | | TimeInterval int `mapstructure: "timeInterval"` |
| | | BatchSize int `mapstructure: "batchSize"` |
| | | } |
| | | |
| | | type app struct { |
| | |
| | | } |
| | | |
| | | type api struct { |
| | | Host string `mapstructure: "host"` |
| | | Port string `mapstructure: "port"` |
| | | CsTimes int `mapstructure:"csTimes"` |
| | | CsHours int `mapstructure:"csHours"` |
| | | AInterval int `mapstructure:"aInterval"` |
| | | Host string `mapstructure: "host"` |
| | | Port string `mapstructure: "port"` |
| | | TimeThreshold int `mapstructure:"timeThreshold"` |
| | | CsTimes int `mapstructure:"csTimes"` |
| | | CsHours int `mapstructure:"csHours"` |
| | | AInterval int `mapstructure:"aInterval"` |
| | | } |
| | | |
| | | var LogConf = &LogConfig{} |
| | |
| | | var err error |
| | | viper.SetConfigType("yaml") |
| | | viper.SetConfigName(env) |
| | | viper.AddConfigPath("config") |
| | | viper.AddConfigPath("./") |
| | | viper.AddConfigPath("./config") |
| | | viper.AddConfigPath("../config") |
| | | err = viper.ReadInConfig() |
| | | if err != nil { |
| | | log.Fatal("error on parsing configuration file", err) |