forked from crowdsecurity/cs-cloudflare-worker-bouncer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
25 lines (21 loc) · 912 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package main
import (
"flag"
log "github.com/sirupsen/logrus"
"github.com/crowdsecurity/crowdsec-cloudflare-worker-bouncer/cmd"
)
func main() {
configTokens := flag.String("g", "", "comma separated tokens to generate config for")
configOutputPath := flag.String("o", "", "path to store generated config to")
configPath := flag.String("c", "", "path to config file")
ver := flag.Bool("version", false, "Display version information and exit")
testConfig := flag.Bool("t", false, "test config and exit")
showConfig := flag.Bool("T", false, "show full config (.yaml + .yaml.local) and exit")
deleteOnly := flag.Bool("d", false, "delete all the created infra and exit")
setupOnly := flag.Bool("s", false, "setup the infra and exit")
flag.Parse()
err := cmd.Execute(configTokens, configOutputPath, configPath, ver, testConfig, showConfig, deleteOnly, setupOnly)
if err != nil {
log.Fatal(err)
}
}