-
Notifications
You must be signed in to change notification settings - Fork 0
/
const.go
96 lines (76 loc) · 1.58 KB
/
const.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
package commands
import "github.com/spf13/cobra"
const (
appName = "xipher"
xipherKeyPrefix = "XK_"
xipherTxtPrefix = "XT_"
)
var (
// Xipher Command
xipherCmd *cobra.Command
// Version Command
versionCmd *cobra.Command
// Keygen Command
keygenCmd *cobra.Command
// Encrypt Command
encryptCmd *cobra.Command
// Encrypt String Command
encryptTxtCmd *cobra.Command
// Encrypt File Command
encryptFileCmd *cobra.Command
// Decrypt Command
decryptCmd *cobra.Command
// Decrypt String Command
decryptTxtCmd *cobra.Command
// Decrypt File Command
decryptFileCmd *cobra.Command
)
type flagDef struct {
name string
shorthand string
usage string
}
var (
// Version Flag
versionFlag = flagDef{
name: "version",
shorthand: "v",
usage: "Shows version info",
}
// Ignore Password Policy Check Flag
ignorePasswordCheckFlag = flagDef{
name: "ignore",
shorthand: "i",
usage: "Ignores the password policy check",
}
// Key Flag
keyFlag = flagDef{
name: "key",
shorthand: "k",
usage: "Specify a key string",
}
// Ciphertext Flag
ciphertextFlag = flagDef{
name: "ciphertext",
shorthand: "c",
usage: "Specify the ciphertext",
}
// File Flag
fileFlag = flagDef{
name: "file",
shorthand: "f",
usage: "Specify file path",
}
// Out Flag
outFlag = flagDef{
name: "out",
shorthand: "o",
usage: "Specify an output file path",
}
// Compress Flag
compressFlag = flagDef{
name: "compress",
shorthand: "c",
usage: "Enable compression as the data is encrypted",
}
)