Documentation ¶
Index ¶
- Constants
- Variables
- func ParseArray_uint32(profile *VMDKProfile, reader io.ReaderAt, offset int64, count int) []uint32
- func ParseUint16(reader io.ReaderAt, offset int64) uint16
- func ParseUint32(reader io.ReaderAt, offset int64) uint32
- func ParseUint64(reader io.ReaderAt, offset int64) uint64
- type Extent
- type ExtentStat
- type Misc
- type NullExtent
- type SparseExtent
- type SparseExtentHeader
- type VMDKContext
- type VMDKProfile
- type VMDKStats
Constants ¶
View Source
const ( SPARSE_MAGICNUMBER = 0x564d444b SECTOR_SIZE = 512 )
Variables ¶
View Source
var ( StartExtentRegex = regexp.MustCompile("^# Extent description") ExtentRegex = regexp.MustCompile(`(RW|R) (\d+) ([A-Z]+) "([^"]+)"`) )
Functions ¶
func ParseArray_uint32 ¶
Types ¶
type Extent ¶
type Extent interface { io.ReaderAt VirtualOffset() int64 TotalSize() int64 Stats() ExtentStat Close() Debug() }
type ExtentStat ¶
type Misc ¶
type Misc struct { Reader io.ReaderAt Offset int64 Profile *VMDKProfile }
func (*Misc) DebugString ¶
type NullExtent ¶
type NullExtent struct {
SparseExtent
}
func (*NullExtent) Stats ¶
func (self *NullExtent) Stats() ExtentStat
type SparseExtent ¶
type SparseExtent struct {
// contains filtered or unexported fields
}
func GetSpaseExtent ¶
func GetSpaseExtent(reader io.ReaderAt) (*SparseExtent, error)
func (*SparseExtent) Close ¶
func (self *SparseExtent) Close()
func (*SparseExtent) Debug ¶
func (self *SparseExtent) Debug()
func (*SparseExtent) ReadAt ¶
func (self *SparseExtent) ReadAt(buf []byte, offset int64) (int, error)
func (*SparseExtent) Stats ¶
func (self *SparseExtent) Stats() ExtentStat
func (*SparseExtent) TotalSize ¶
func (self *SparseExtent) TotalSize() int64
func (*SparseExtent) VirtualOffset ¶
func (self *SparseExtent) VirtualOffset() int64
type SparseExtentHeader ¶
type SparseExtentHeader struct { Reader io.ReaderAt Offset int64 Profile *VMDKProfile }
func (*SparseExtentHeader) DebugString ¶
func (self *SparseExtentHeader) DebugString() string
func (*SparseExtentHeader) Size ¶
func (self *SparseExtentHeader) Size() int
type VMDKContext ¶
type VMDKContext struct {
// contains filtered or unexported fields
}
func GetVMDKContext ¶
func (*VMDKContext) Close ¶
func (self *VMDKContext) Close()
func (*VMDKContext) Debug ¶
func (self *VMDKContext) Debug()
func (*VMDKContext) Size ¶
func (self *VMDKContext) Size() int64
func (*VMDKContext) Stats ¶
func (self *VMDKContext) Stats() VMDKStats
type VMDKProfile ¶
type VMDKProfile struct { Off_Misc_a int64 Off_SparseExtentHeader_magicNumber int64 Off_SparseExtentHeader_version int64 Off_SparseExtentHeader_flags int64 Off_SparseExtentHeader_capacity int64 Off_SparseExtentHeader_grainSize int64 Off_SparseExtentHeader_descriptorOffset int64 Off_SparseExtentHeader_descriptorSize int64 Off_SparseExtentHeader_numGTEsPerGT int64 Off_SparseExtentHeader_rgdOffset int64 Off_SparseExtentHeader_gdOffset int64 Off_SparseExtentHeader_overHead int64 Off_SparseExtentHeader_compressAlgorithm int64 }
func NewVMDKProfile ¶
func NewVMDKProfile() *VMDKProfile
func (*VMDKProfile) SparseExtentHeader ¶
func (self *VMDKProfile) SparseExtentHeader(reader io.ReaderAt, offset int64) *SparseExtentHeader
type VMDKStats ¶
type VMDKStats struct { TotalSize int64 `json:"TotalSize"` Extents []ExtentStat `json:"Extents"` }
Click to show internal directories.
Click to hide internal directories.