forked from microsoft/azure-vhd-utils
-
Notifications
You must be signed in to change notification settings - Fork 0
/
diskType.go
38 lines (34 loc) · 901 Bytes
/
diskType.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 footer
// DiskType type represents the type of the disk, Value is stored in the footer
// in big-endian format.
//
type DiskType uint32
const (
// DiskTypeNone represents a nil disk type
//
DiskTypeNone DiskType = 0
// DiskTypeFixed represents a fixed disk type
//
DiskTypeFixed DiskType = 2
// DiskTypeDynamic represents a dynamic disk type
//
DiskTypeDynamic DiskType = 3
// DiskTypeDifferencing represents a differencing disk type
//
DiskTypeDifferencing DiskType = 4
)
// String returns the string representation of the DiskType. If the int type value
// does not match with the predefined disk types then this function return the
// string "UnknownDiskType"
//
func (d DiskType) String() string {
switch d {
case DiskTypeFixed:
return "Fixed"
case DiskTypeDynamic:
return "Dynamic"
case DiskTypeDifferencing:
return "Differencing"
}
return "UnknownDiskType"
}