Documentation
¶
Index ¶
- type FormatVolumeRequest
- type FormatVolumeResponse
- type GetClosestVolumeIDFromTargetPathRequest
- type GetClosestVolumeIDFromTargetPathResponse
- type GetDiskNumberFromVolumeIDRequest
- type GetDiskNumberFromVolumeIDResponse
- type GetVolumeIDFromTargetPathRequest
- type GetVolumeIDFromTargetPathResponse
- type GetVolumeStatsRequest
- type GetVolumeStatsResponse
- type Interface
- type IsVolumeFormattedRequest
- type IsVolumeFormattedResponse
- type ListVolumesOnDiskRequest
- type ListVolumesOnDiskResponse
- type MountVolumeRequest
- type MountVolumeResponse
- type ResizeVolumeRequest
- type ResizeVolumeResponse
- type UnmountVolumeRequest
- type UnmountVolumeResponse
- type Volume
- func (v *Volume) FormatVolume(context context.Context, request *FormatVolumeRequest) (*FormatVolumeResponse, error)
- func (v *Volume) GetClosestVolumeIDFromTargetPath(context context.Context, request *GetClosestVolumeIDFromTargetPathRequest) (*GetClosestVolumeIDFromTargetPathResponse, error)
- func (v *Volume) GetDiskNumberFromVolumeID(context context.Context, request *GetDiskNumberFromVolumeIDRequest) (*GetDiskNumberFromVolumeIDResponse, error)
- func (v *Volume) GetVolumeIDFromTargetPath(context context.Context, request *GetVolumeIDFromTargetPathRequest) (*GetVolumeIDFromTargetPathResponse, error)
- func (v *Volume) GetVolumeStats(context context.Context, request *GetVolumeStatsRequest) (*GetVolumeStatsResponse, error)
- func (v *Volume) IsVolumeFormatted(context context.Context, request *IsVolumeFormattedRequest) (*IsVolumeFormattedResponse, error)
- func (v *Volume) ListVolumesOnDisk(context context.Context, request *ListVolumesOnDiskRequest) (*ListVolumesOnDiskResponse, error)
- func (v *Volume) MountVolume(context context.Context, request *MountVolumeRequest) (*MountVolumeResponse, error)
- func (v *Volume) ResizeVolume(context context.Context, request *ResizeVolumeRequest) (*ResizeVolumeResponse, error)
- func (v *Volume) UnmountVolume(context context.Context, request *UnmountVolumeRequest) (*UnmountVolumeResponse, error)
- func (v *Volume) WriteVolumeCache(context context.Context, request *WriteVolumeCacheRequest) (*WriteVolumeCacheResponse, error)
- type WriteVolumeCacheRequest
- type WriteVolumeCacheResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FormatVolumeRequest ¶
type FormatVolumeRequest struct {
// Volume device ID of the volume to format
VolumeID string
}
type FormatVolumeResponse ¶
type FormatVolumeResponse struct {
}
type GetClosestVolumeIDFromTargetPathRequest ¶
type GetClosestVolumeIDFromTargetPathRequest struct {
// The target path
TargetPath string
}
type GetClosestVolumeIDFromTargetPathResponse ¶
type GetClosestVolumeIDFromTargetPathResponse struct {
// The volume device ID
VolumeID string
}
type GetDiskNumberFromVolumeIDRequest ¶
type GetDiskNumberFromVolumeIDRequest struct {
// Volume device ID of the volume to get the disk number for
VolumeID string
}
type GetDiskNumberFromVolumeIDResponse ¶
type GetDiskNumberFromVolumeIDResponse struct {
// Corresponding disk number
DiskNumber uint32
}
type GetVolumeIDFromTargetPathRequest ¶
type GetVolumeIDFromTargetPathRequest struct {
// The target path
TargetPath string
}
type GetVolumeIDFromTargetPathResponse ¶
type GetVolumeIDFromTargetPathResponse struct {
// The volume device ID
VolumeID string
}
type GetVolumeStatsRequest ¶
type GetVolumeStatsRequest struct {
// Volume device Id of the volume to get the stats for
VolumeID string
}
type GetVolumeStatsResponse ¶
type Interface ¶
type Interface interface {
// FormatVolume formats a volume with NTFS.
FormatVolume(context.Context, *FormatVolumeRequest) (*FormatVolumeResponse, error)
// GetClosestVolumeIDFromTargetPath gets the closest volume id for a given target path
// by following symlinks and moving up in the filesystem, if after moving up in the filesystem
// we get to a DriveLetter then the volume corresponding to this drive letter is returned instead.
GetClosestVolumeIDFromTargetPath(context.Context, *GetClosestVolumeIDFromTargetPathRequest) (*GetClosestVolumeIDFromTargetPathResponse, error)
// GetDiskNumberFromVolumeID gets the disk number of the disk where the volume is located.
GetDiskNumberFromVolumeID(context.Context, *GetDiskNumberFromVolumeIDRequest) (*GetDiskNumberFromVolumeIDResponse, error)
// GetVolumeIDFromTargetPath gets the volume id for a given target path.
GetVolumeIDFromTargetPath(context.Context, *GetVolumeIDFromTargetPathRequest) (*GetVolumeIDFromTargetPathResponse, error)
// GetVolumeStats gathers total bytes and used bytes for a volume.
GetVolumeStats(context.Context, *GetVolumeStatsRequest) (*GetVolumeStatsResponse, error)
// IsVolumeFormatted checks if a volume is formatted.
IsVolumeFormatted(context.Context, *IsVolumeFormattedRequest) (*IsVolumeFormattedResponse, error)
// ListVolumesOnDisk returns the volume IDs (in \\.\Volume{GUID} format) for all volumes from a
// given disk number and partition number (optional)
ListVolumesOnDisk(context.Context, *ListVolumesOnDiskRequest) (*ListVolumesOnDiskResponse, error)
// MountVolume mounts the volume at the requested global staging path.
MountVolume(context.Context, *MountVolumeRequest) (*MountVolumeResponse, error)
// ResizeVolume performs resizing of the partition and file system for a block based volume.
ResizeVolume(context.Context, *ResizeVolumeRequest) (*ResizeVolumeResponse, error)
// UnmountVolume flushes data cache to disk and removes the global staging path.
UnmountVolume(context.Context, *UnmountVolumeRequest) (*UnmountVolumeResponse, error)
// WriteVolumeCache write volume cache to disk.
WriteVolumeCache(context.Context, *WriteVolumeCacheRequest) (*WriteVolumeCacheResponse, error)
}
type IsVolumeFormattedRequest ¶
type IsVolumeFormattedRequest struct {
// Volume device ID of the volume to check
VolumeID string
}
type IsVolumeFormattedResponse ¶
type IsVolumeFormattedResponse struct {
// Whether the volume is formatted with NTFS
Formatted bool
}
type ListVolumesOnDiskResponse ¶
type ListVolumesOnDiskResponse struct {
// Volume device IDs of volumes on the specified disk
VolumeIDs []string
}
type MountVolumeRequest ¶
type MountVolumeResponse ¶
type MountVolumeResponse struct {
}
type ResizeVolumeRequest ¶
type ResizeVolumeResponse ¶
type ResizeVolumeResponse struct {
}
type UnmountVolumeRequest ¶
type UnmountVolumeResponse ¶
type UnmountVolumeResponse struct {
}
type Volume ¶
type Volume struct {
// contains filtered or unexported fields
}
Volume wraps the host API and implements the interface
func (*Volume) FormatVolume ¶
func (v *Volume) FormatVolume(context context.Context, request *FormatVolumeRequest) (*FormatVolumeResponse, error)
func (*Volume) GetClosestVolumeIDFromTargetPath ¶
func (v *Volume) GetClosestVolumeIDFromTargetPath(context context.Context, request *GetClosestVolumeIDFromTargetPathRequest) (*GetClosestVolumeIDFromTargetPathResponse, error)
func (*Volume) GetDiskNumberFromVolumeID ¶
func (v *Volume) GetDiskNumberFromVolumeID(context context.Context, request *GetDiskNumberFromVolumeIDRequest) (*GetDiskNumberFromVolumeIDResponse, error)
func (*Volume) GetVolumeIDFromTargetPath ¶
func (v *Volume) GetVolumeIDFromTargetPath(context context.Context, request *GetVolumeIDFromTargetPathRequest) (*GetVolumeIDFromTargetPathResponse, error)
func (*Volume) GetVolumeStats ¶
func (v *Volume) GetVolumeStats(context context.Context, request *GetVolumeStatsRequest) (*GetVolumeStatsResponse, error)
func (*Volume) IsVolumeFormatted ¶
func (v *Volume) IsVolumeFormatted(context context.Context, request *IsVolumeFormattedRequest) (*IsVolumeFormattedResponse, error)
func (*Volume) ListVolumesOnDisk ¶
func (v *Volume) ListVolumesOnDisk(context context.Context, request *ListVolumesOnDiskRequest) (*ListVolumesOnDiskResponse, error)
func (*Volume) MountVolume ¶
func (v *Volume) MountVolume(context context.Context, request *MountVolumeRequest) (*MountVolumeResponse, error)
func (*Volume) ResizeVolume ¶
func (v *Volume) ResizeVolume(context context.Context, request *ResizeVolumeRequest) (*ResizeVolumeResponse, error)
func (*Volume) UnmountVolume ¶
func (v *Volume) UnmountVolume(context context.Context, request *UnmountVolumeRequest) (*UnmountVolumeResponse, error)
func (*Volume) WriteVolumeCache ¶
func (v *Volume) WriteVolumeCache(context context.Context, request *WriteVolumeCacheRequest) (*WriteVolumeCacheResponse, error)
type WriteVolumeCacheRequest ¶
type WriteVolumeCacheRequest struct {
// Volume device ID of the volume to flush the cache
VolumeID string
}
type WriteVolumeCacheResponse ¶
type WriteVolumeCacheResponse struct {
}
Click to show internal directories.
Click to hide internal directories.