-
Notifications
You must be signed in to change notification settings - Fork 1
/
model.go
38 lines (35 loc) · 1.11 KB
/
model.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
package main
// EnvDocItem is a documentation item for one environment variable.
type EnvDocItem struct {
// Name of the environment variable.
Name string
// Doc is a documentation text for the environment variable.
Doc string
// Opts is a set of options for environment variable parsing.
Opts EnvVarOptions
// Children is a list of child environment variables.
Children []*EnvDocItem
}
type EnvScope struct {
// Name of the scope.
Name string
// Doc is a documentation text for the scope.
Doc string
// Vars is a list of environment variables.
Vars []*EnvDocItem
}
// EnvVarOptions is a set of options for environment variable parsing.
type EnvVarOptions struct {
// Separator is a separator for array types.
Separator string
// Required is a flag that enables required check.
Required bool
// Expand is a flag that enables environment variable expansion.
Expand bool
// NonEmpty is a flag that enables non-empty check.
NonEmpty bool
// FromFile is a flag that enables reading environment variable from a file.
FromFile bool
// Default is a default value for the environment variable.
Default string
}