| | |
| | | SyncServer string `mapstructure:"sync-server"` |
| | | ReportServer string `mapstructure:"report-server"` |
| | | ReportInterval int `mapstructure:"report-interval"` |
| | | RetryInterval int `mapstructure:"retry-interval"` |
| | | CutFaceImage bool `mapstructure:"cut-face-image"` |
| | | } |
| | | |
| | | type rateLimitConfig struct { |
| | |
| | | v.SetConfigType("yaml") |
| | | v.SetConfigName("gat1400") |
| | | v.AddConfigPath("./config/") |
| | | v.AddConfigPath("../config/") |
| | | err = v.ReadInConfig() |
| | | if err != nil { |
| | | fmt.Println("error on parsing configuration file", err) |
| | |
| | | LogConf.Level = "info" |
| | | } |
| | | |
| | | if ForwardConf.ReportInterval == 0 { |
| | | ForwardConf.ReportInterval = 10 |
| | | } |
| | | |
| | | if ForwardConf.RetryInterval == 0 { |
| | | ForwardConf.RetryInterval = 5 |
| | | } |
| | | |
| | | logger.SetLogLevel(LogConf.Level) |
| | | } |