Improve fail reasons, fix api crashes

- Add options about TLS verification
- Fix crashes when cachet presents IDs as a string
- Improve fail reasons
This commit is contained in:
Matej Kramny
2015-07-19 20:25:34 +01:00
parent 350244514a
commit 7a5ad278bb
6 changed files with 85 additions and 50 deletions

View File

@@ -21,11 +21,12 @@ var Logger *log.Logger
// CachetConfig is the monitoring tool configuration
type CachetConfig struct {
APIUrl string `json:"api_url"`
APIToken string `json:"api_token"`
Monitors []*Monitor `json:"monitors"`
SystemName string `json:"system_name"`
LogPath string `json:"log_path"`
APIUrl string `json:"api_url"`
APIToken string `json:"api_token"`
Monitors []*Monitor `json:"monitors"`
SystemName string `json:"system_name"`
LogPath string `json:"log_path"`
InsecureAPI bool `json:"insecure_api"`
}
func init() {
@@ -107,7 +108,7 @@ func init() {
}
}
flags := log.Llongfile|log.Ldate|log.Ltime
flags := log.Llongfile | log.Ldate | log.Ltime
if len(os.Getenv("DEVELOPMENT")) > 0 {
flags = 0
}