/
flags.go
113 lines (108 loc) · 2.13 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
package main
import (
"github.com/urfave/cli"
)
// GlobalFlags are flags of gat command
var GlobalFlags = []cli.Flag{
cli.StringFlag{
Name: "confpath, c",
Usage: "Your original config json path",
},
cli.BoolFlag{
Name: "debug, d",
Usage: "Debug detail information",
},
}
// GistFlags are gist subcommand flags
var GistFlags = []cli.Flag{
cli.StringFlag{
Name: "api-domain",
Usage: "Github api domain",
},
cli.StringFlag{
Name: "access-token",
Usage: "Github api access token",
},
cli.IntFlag{
Name: "timeout",
Usage: "Timeout for connection",
},
cli.StringFlag{
Name: "description, d",
Usage: "A description of the gist",
},
cli.BoolFlag{
Name: "public, p",
Usage: "Indicates whether the gist is public. Default: false",
},
}
// SlackFlags are slack subcommand flags
var SlackFlags = []cli.Flag{
cli.StringFlag{
Name: "webhook-url",
Usage: "Webhook URL",
},
cli.StringFlag{
Name: "channel, c",
Usage: "Target channel",
},
cli.StringFlag{
Name: "username, u",
Usage: "Username",
},
cli.StringFlag{
Name: "icon, i",
Usage: "Icon url or emoji format text (:EMOJI_NAME:)",
},
cli.IntFlag{
Name: "timeout",
Usage: "Timeout for connection",
},
cli.BoolFlag{
Name: "without-markdown",
Usage: "Not format slack's markdown",
},
cli.BoolFlag{
Name: "without-unfurl",
Usage: "Not unfurl media links",
},
cli.BoolFlag{
Name: "linkfy, l",
Usage: "Linkify channel names (starting with a '#') and usernames (starting with an '@')",
},
cli.StringFlag{
Name: "color",
Usage: "Color name or any hex color code",
},
cli.StringFlag{
Name: "api-token",
Usage: "Your oauth2 API token",
},
}
// HipchatFlags are hipchat subcommand flags
var HipchatFlags = []cli.Flag{
cli.StringFlag{
Name: "api-root",
Usage: "API root URL",
},
cli.StringFlag{
Name: "access-token",
Usage: "Hipchat API access token",
},
cli.StringFlag{
Name: "room, r",
Usage: "Target room",
},
cli.StringFlag{
Name: "color, c",
Usage: "Message color",
},
cli.BoolFlag{
Name: "notify, n",
Usage: "Notify",
},
cli.StringFlag{
Name: "format, f",
Usage: "Message format",
},
}