/
cmds_volume_types.go
52 lines (44 loc) · 1.03 KB
/
cmds_volume_types.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
package cli
import (
"regexp"
apitypes "github.com/rexray/rexray/libstorage/api/types"
)
type lsVolumesResult struct {
vols []*apitypes.Volume
iid *apitypes.InstanceID
volMatchType map[*apitypes.Volume]matchTypes
volMatchPatt map[*apitypes.Volume]string
matchTypeCount map[matchTypes]int
matchPattCount map[string]int
uniqStrMatchID map[string]bool
uniqStrMatchName map[string]bool
volMatchVals map[*apitypes.Volume]string
}
type volumeWithPath struct {
*apitypes.Volume
Path string
}
type matchTypes int
const (
matchTypeGlob matchTypes = iota
matchTypeExactID
matchTypeExactIDIgnoreCase
matchTypePartialID
matchTypePartialIDIgnoreCase
matchTypeExactName
matchTypeExactNameIgnoreCase
matchTypePartialName
matchTypePartialNameIgnoreCase
matchTypeRegexpID
matchTypeRegexpIDIgnoreCase
matchTypeRegexpName
matchTypeRegexpNameIgnoreCase
)
type matchedVolume struct {
*apitypes.Volume
matchType matchTypes
}
type regexpPair struct {
*regexp.Regexp
ignoreCase *regexp.Regexp
}