Documentation ¶
Index ¶
- func CreateSinglePartition(diskPath string) (io.Reader, error)
- func CreateSnapRAID(raidOptions utils.SnapRAIDConfig, editRaid string) error
- func DeleteSnapRAID(name string) error
- func FormatDisk(diskPath string, filesystemType string) (io.Reader, error)
- func FormatDiskRoute(w http.ResponseWriter, req *http.Request)
- func GetDiskUsage(path string) (perc uint64, err error)
- func InitSnapRAIDConfig()
- func IsDiskMounted(diskPath string) (bool, error)
- func ListDisksRoute(w http.ResponseWriter, req *http.Request)
- func ListMountsRoute(w http.ResponseWriter, req *http.Request)
- func MergeRoute(w http.ResponseWriter, req *http.Request)
- func Mount(path, mountpoint string, permanent bool, chown string) error
- func MountMergerFS(paths []string, mountpoint string, opts string, permanent bool, chown string) error
- func MountRoute(w http.ResponseWriter, req *http.Request)
- func RunSnapRAIDFix(raid utils.SnapRAIDConfig) error
- func RunSnapRAIDScrub(raid utils.SnapRAIDConfig) error
- func RunSnapRAIDStatus(raid utils.SnapRAIDConfig) (string, error)
- func RunSnapRAIDSync(raid utils.SnapRAIDConfig) error
- func SNAPRaidCRUDRoute(w http.ResponseWriter, req *http.Request)
- func SnapRAIDEditRoute(w http.ResponseWriter, req *http.Request)
- func SnapRAIDRunRoute(w http.ResponseWriter, req *http.Request)
- func ToggleSnapRAID(name string, enable bool) error
- func Unmount(mountpoint string, permanent bool) error
- func UnmountRoute(w http.ResponseWriter, req *http.Request)
- type BlockDevice
- type DiskInfo
- type FormatDiskJSON
- type MergeRequest
- type MountPoint
- type MountRequest
- type SnapRAIDStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateSnapRAID ¶
func CreateSnapRAID(raidOptions utils.SnapRAIDConfig, editRaid string) error
Create a SnapRAID configuration
func DeleteSnapRAID ¶
func FormatDiskRoute ¶
func FormatDiskRoute(w http.ResponseWriter, req *http.Request)
func GetDiskUsage ¶
func InitSnapRAIDConfig ¶
func InitSnapRAIDConfig()
func ListDisksRoute ¶
func ListDisksRoute(w http.ResponseWriter, req *http.Request)
func ListMountsRoute ¶
func ListMountsRoute(w http.ResponseWriter, req *http.Request)
func MergeRoute ¶
func MergeRoute(w http.ResponseWriter, req *http.Request)
MergeRoute handles merging filesystem requests
func MountMergerFS ¶
func MountMergerFS(paths []string, mountpoint string, opts string, permanent bool, chown string) error
Mount mounts a filesystem located at 'path' to 'mountpoint'.
func MountRoute ¶
func MountRoute(w http.ResponseWriter, req *http.Request)
MountRoute handles mounting filesystem requests
func RunSnapRAIDFix ¶
func RunSnapRAIDFix(raid utils.SnapRAIDConfig) error
func RunSnapRAIDScrub ¶
func RunSnapRAIDScrub(raid utils.SnapRAIDConfig) error
func RunSnapRAIDStatus ¶
func RunSnapRAIDStatus(raid utils.SnapRAIDConfig) (string, error)
func RunSnapRAIDSync ¶
func RunSnapRAIDSync(raid utils.SnapRAIDConfig) error
func SNAPRaidCRUDRoute ¶
func SNAPRaidCRUDRoute(w http.ResponseWriter, req *http.Request)
func SnapRAIDEditRoute ¶
func SnapRAIDEditRoute(w http.ResponseWriter, req *http.Request)
func SnapRAIDRunRoute ¶
func SnapRAIDRunRoute(w http.ResponseWriter, req *http.Request)
UnmountRoute handles unmounting filesystem requests
func ToggleSnapRAID ¶
func UnmountRoute ¶
func UnmountRoute(w http.ResponseWriter, req *http.Request)
UnmountRoute handles unmounting filesystem requests
Types ¶
type BlockDevice ¶
type BlockDevice struct { lsblk.BlockDevice Children []BlockDevice `json:"children"` Usage uint64 `json:"usage"` SMART smart.GenericAttributes `json:"smart"` // Add SMART data field }
func GetRecursiveDiskUsageAndSMARTInfo ¶
func GetRecursiveDiskUsageAndSMARTInfo(devices []lsblk.BlockDevice) ([]BlockDevice, error)
func ListDisks ¶
func ListDisks() ([]BlockDevice, error)
type FormatDiskJSON ¶
type MergeRequest ¶
type MergeRequest struct { Branches []string `json:"branches"` MountPoint string `json:"mountPoint"` Permanent bool `json:"permanent"` Chown string `json:"chown"` Opts string `json:"opts"` }
Assuming the structure for the mount/unmount request
type MountPoint ¶
type MountPoint struct { Path string `json:"path"` Permenant bool `json:"permenant"` Device string `json:"device"` Type string `json:"type"` Opts []string `json:"opts"` }
func ListMounts ¶
func ListMounts() ([]MountPoint, error)
ListMounts lists all the mount points on the system
type MountRequest ¶
type MountRequest struct { Path string `json:"path"` MountPoint string `json:"mountPoint"` Permanent bool `json:"permanent"` Chown string `json:"chown"` }
Assuming the structure for the mount/unmount request
type SnapRAIDStatus ¶
type SnapRAIDStatus struct { utils.SnapRAIDConfig Status string }
Click to show internal directories.
Click to hide internal directories.