forked from spezam/eventbridge-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
flags.go
68 lines (63 loc) · 1.46 KB
/
flags.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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
package main
import (
"fmt"
"github.com/urfave/cli/v2"
)
var flags = []cli.Flag{
&cli.StringFlag{
Name: "profile",
Aliases: []string{"p"},
Usage: "AWS profile",
EnvVars: []string{"AWS_PROFILE"},
},
&cli.StringFlag{
Name: "region",
Aliases: []string{"r"},
Usage: "AWS region",
EnvVars: []string{"AWS_DEFAULT_REGION", "AWS_REGION"},
},
&cli.StringFlag{
Name: "eventbusname",
Aliases: []string{"b"},
Usage: "EventBridge Bus Name",
Value: "default",
},
&cli.StringFlag{
Name: "eventpattern",
Aliases: []string{"e"},
Usage: "EventBridge event pattern. Can be prefixed by 'file://' or 'sam://'",
Value: fmt.Sprintf(`{"source": [{"anything-but": ["%s"]}]}`, namespace),
},
&cli.BoolFlag{
Name: "prettyjson",
Aliases: []string{"j"},
Usage: "Pretty JSON output",
},
}
var flagsCI = []cli.Flag{
&cli.Int64Flag{
Name: "timeout",
Aliases: []string{"t"},
Usage: "CI timeout in seconds",
Value: 12,
},
&cli.StringFlag{
Name: "inputevent",
Aliases: []string{"i"},
Usage: "Input event. Can be prefixed by 'file://' or omitted if coming from other sources",
},
}
var flagsTestEventPattern = []cli.Flag{
&cli.StringFlag{
Name: "eventrule",
Aliases: []string{"e"},
Usage: "EventBridge rule name. Can be a prefix",
Required: true,
},
&cli.StringFlag{
Name: "inputevent",
Aliases: []string{"i"},
Usage: "Input event. Can be prefixed by 'file://'",
Required: true,
},
}