storage

package
v0.15.0-unstable5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 19, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatDisk

func FormatDisk(diskPath string, filesystemType string) error

func GetDiskUsage

func GetDiskUsage(path string) (used uint64, size uint64, err error)

func IsDiskMounted

func IsDiskMounted(diskPath string) (bool, error)

check if disk is mounted

func ListDisks

func ListDisks() ([]lsblk.BlockDevice, error)

func ListDisksRoute

func ListDisksRoute(w http.ResponseWriter, req *http.Request)

func ListMounts

func ListMounts() ([]mount.MountPoint, error)

ListMounts lists all the mount points on the system

func ListMountsRoute

func ListMountsRoute(w http.ResponseWriter, req *http.Request)

func MountDisk

func MountDisk(diskPath string, mountPath string) error

mount disk

func UnmountDisk

func UnmountDisk(mountPath string) error

unmount disk

Types

type BlockDevice

type BlockDevice struct {
	lsblk.BlockDevice
	RealChildren []*BlockDevice
	Parent       *BlockDevice
}

type DiskInfo

type DiskInfo struct {
	Path string
	Name string
	Size uint64
	Used uint64
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL