service

package
v0.3.7-alpha3 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2022 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PersistentTypeNone   = "none"
	PersistentTypeFStab  = "fstab"
	PersistentTypeCasaOS = "casaos"
)

Variables

View Source
var Cache *cache.Cache

Functions

This section is empty.

Types

type DiskService

type DiskService interface {
	AddPartition(path string) error
	DeletePartition(path string) error
	CheckSerialDiskMount()
	FormatDisk(path, format string) ([]string, error)
	GetDiskInfo(path string) model.LSBLKModel
	GetPersistentType(path string) string
	GetUSBDriveStatusList() []model.USBDriveStatus
	LSBLK(isUseCache bool) []model.LSBLKModel
	MountDisk(path, volume string) (string, error)
	RemoveLSBLKCache()
	SmartCTL(path string) model.SmartctlA
	UmountPointAndRemoveDir(path string) error
	UmountUSB(path string) error

	UpdateMountPointInDB(m model2.Volume)
	DeleteMountPointFromDB(path, mountPoint string)
	GetSerialAllFromDB() []model2.Volume
	SaveMountPointToDB(m model2.Volume)
}

func NewDiskService

func NewDiskService(db *gorm.DB) DiskService

type Repository

type Repository interface {
	Disk() DiskService
	USB() USBService
	LocalStorage() *v2.LocalStorageService
	Gateway() gateway.ManagementService
	Notify() common.NotifyService
	Shares() common.ShareService
}
var MyService Repository

func NewService

func NewService(db *gorm.DB) Repository

type USBService

type USBService interface {
	UpdateUSBAutoMount(state string)
	ExecUSBAutoMountShell(state string)

	GetSysInfo() host.InfoStat
	GetDeviceTree() (string, error)
}

func NewUSBService

func NewUSBService() USBService

Directories

Path Synopsis
@Author: LinkLeong link@icewhale.org
@Author: LinkLeong link@icewhale.org
v2
fs

Jump to

Keyboard shortcuts

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