switch to viper for configuration and use cobra for cli

This commit is contained in:
Nicola Murino
2019-08-07 22:46:13 +02:00
parent 13d4489c48
commit 8f421b7d0f
21 changed files with 532 additions and 200 deletions

View File

@@ -64,11 +64,11 @@ type ActiveQuotaScan struct {
// An external command can be executed and/or an HTTP notification can be fired
type Actions struct {
// Valid values are download, upload, delete, rename. Empty slice to disable
ExecuteOn []string `json:"execute_on"`
ExecuteOn []string `json:"execute_on" mapstructure:"execute_on"`
// Absolute path to the command to execute, empty to disable
Command string `json:"command"`
Command string `json:"command" mapstructure:"command"`
// The URL to notify using an HTTP GET, empty to disable
HTTPNotificationURL string `json:"http_notification_url"`
HTTPNotificationURL string `json:"http_notification_url" mapstructure:"http_notification_url"`
}
// ConnectionStatus status for an active connection