Virustotal arguments

This commit is contained in:
Remco 2017-03-22 23:14:01 +01:00
parent 7471990ef5
commit d6f225e232
2 changed files with 16 additions and 0 deletions

View file

@ -117,6 +117,12 @@ var globalFlags = []cli.Flag{
Value: "", Value: "",
EnvVar: "CLAMAV_HOST", EnvVar: "CLAMAV_HOST",
}, },
cli.StringFlag{
Name: "virustotal-key",
Usage: "virustotal-key",
Value: "",
EnvVar: "VIRUSTOTAL_KEY",
},
cli.BoolFlag{ cli.BoolFlag{
Name: "profiler", Name: "profiler",
Usage: "enable profiling", Usage: "enable profiling",
@ -176,6 +182,10 @@ func New() *Cmd {
options = append(options, server.UseLetsEncrypt(strings.Split(v, ","))) options = append(options, server.UseLetsEncrypt(strings.Split(v, ",")))
} }
if v := c.String("virustotal-key"); v != "" {
options = append(options, server.VirustotalKey(v))
}
if v := c.String("clamav-host"); v != "" { if v := c.String("clamav-host"); v != "" {
options = append(options, server.ClamavHost(v)) options = append(options, server.ClamavHost(v))
} }

View file

@ -66,6 +66,12 @@ func ClamavHost(s string) OptionFn {
} }
} }
func VirustotalKey(s string) OptionFn {
return func(srvr *Server) {
srvr.VirusTotalKey = s
}
}
func Listener(s string) OptionFn { func Listener(s string) OptionFn {
return func(srvr *Server) { return func(srvr *Server) {
srvr.ListenerString = s srvr.ListenerString = s