Documentation
¶
Overview ¶
* Copyright (c) 2025 System233 * * This software is released under the MIT License. * https://opensource.org/licenses/MIT
* Copyright (c) 2025 System233 * * This software is released under the MIT License. * https://opensource.org/licenses/MIT
* Copyright (c) 2025 System233 * * This software is released under the MIT License. * https://opensource.org/licenses/MIT
Index ¶
- Variables
- func BuildHelpMessage(help string) string
- func CopyFile(destPath string, src io.Reader, perm os.FileMode, force bool) error
- func CopyFileIO(src, dst string) error
- func CopySymlink(destPath string, src string, force bool) error
- func CreateCommand(name string) *exec.Cmd
- func Debug(v ...any)
- func DefaultShell() string
- func DumpJsonData(v interface{}) ([]byte, error)
- func DumpJsonFile(file string, v interface{}) error
- func DumpYamlData(v interface{}) ([]byte, error)
- func DumpYamlFile(file string, v interface{}) error
- func Exec(args ...string)
- func ExecFuseOvlMain(args []string) error
- func ExecRaw(args ...string) error
- func ExitWith(err error, v ...any)
- func FuseOvlMain(args []string) error
- func FuseOvlMount(opt FuseOvlMountFlag) error
- func GetKillerExec() (string, error)
- func IsExist(name string) bool
- func IsSameFile(file1 string, file2 string) (bool, error)
- func LoadJsonData(data []byte, v interface{}) error
- func LoadJsonFile(file string, v interface{}) error
- func LoadYamlData(data []byte, v interface{}) error
- func LoadYamlFile(file string, v interface{}) error
- func MkdirAlls(dirs []string, mode os.FileMode) error
- func Mount(opt *MountOption) error
- func MountAll(opts []MountOption) error
- func MountBind(source string, target string, flags int) error
- func Must(err error, v ...any)
- func NewCommand(name string, args ...string) *exec.Cmd
- func OpenFile(destPath string, perm os.FileMode, force bool) (*os.File, error)
- func ParseMountFlag(flag string) int
- func RunCommand(name string, args ...string) error
- func SetupEnvVar() error
- func SwitchTo(next string, flags *SwitchFlags) error
- func WriteFile(destPath string, data []byte, perm os.FileMode, force bool) error
- type ExitStatus
- type FuseOvlMountFlag
- type MountOption
- type SwitchFlags
Constants ¶
This section is empty.
Variables ¶
View Source
var GlobalFlag struct { Debug bool FuseOverlayFS string FuseOverlayFSArgs string }
View Source
var MountFlagMap = map[string]int{ "active": syscall.MS_ACTIVE, "async": syscall.MS_ASYNC, "bind": syscall.MS_BIND, "rbind": syscall.MS_BIND | syscall.MS_REC, "dirsync": syscall.MS_DIRSYNC, "invalidate": syscall.MS_INVALIDATE, "i_version": syscall.MS_I_VERSION, "kernmount": syscall.MS_KERNMOUNT, "mandlock": syscall.MS_MANDLOCK, "move": syscall.MS_MOVE, "noatime": syscall.MS_NOATIME, "nodev": syscall.MS_NODEV, "nodiratime": syscall.MS_NODIRATIME, "noexec": syscall.MS_NOEXEC, "nosuid": syscall.MS_NOSUID, "nouser": syscall.MS_NOUSER, "posixacl": syscall.MS_POSIXACL, "private": syscall.MS_PRIVATE, "rdonly": syscall.MS_RDONLY, "rec": syscall.MS_REC, "relatime": syscall.MS_RELATIME, "remount": syscall.MS_REMOUNT, "shared": syscall.MS_SHARED, "silent": syscall.MS_SILENT, "slave": syscall.MS_SLAVE, "strictatime": syscall.MS_STRICTATIME, "sync": syscall.MS_SYNC, "synchronous": syscall.MS_SYNCHRONOUS, "unbindable": syscall.MS_UNBINDABLE, }
View Source
var OverlayFlag struct { Self string Shell string Args []string }
Functions ¶
func BuildHelpMessage ¶
func CopyFileIO ¶
func CreateCommand ¶
func DefaultShell ¶
func DefaultShell() string
func DumpJsonData ¶ added in v1.4.6
func DumpJsonFile ¶ added in v1.4.6
func DumpYamlData ¶ added in v1.4.6
func DumpYamlFile ¶ added in v1.4.6
func ExecFuseOvlMain ¶
func FuseOvlMain ¶
func FuseOvlMount ¶
func FuseOvlMount(opt FuseOvlMountFlag) error
func GetKillerExec ¶ added in v1.4.14
func LoadJsonData ¶ added in v1.4.6
func LoadJsonFile ¶ added in v1.4.6
func LoadYamlData ¶ added in v1.4.6
func LoadYamlFile ¶ added in v1.4.6
func Mount ¶
func Mount(opt *MountOption) error
func MountAll ¶
func MountAll(opts []MountOption) error
func ParseMountFlag ¶
func RunCommand ¶
func SetupEnvVar ¶
func SetupEnvVar() error
func SwitchTo ¶
func SwitchTo(next string, flags *SwitchFlags) error
Types ¶
type ExitStatus ¶
type ExitStatus struct {
ExitCode int
}
func (*ExitStatus) Error ¶
func (s *ExitStatus) Error() string
type FuseOvlMountFlag ¶
type FuseOvlMountFlag struct { RedirectDir string // redirect_dir=%s Context string // context=%s LowerDir []string // lowerdir=%s UpperDir string // upperdir=%s WorkDir string // workdir=%s UIDMapping string // uidmapping=%s GIDMapping string // gidmapping=%s Timeout string // timeout=%s Threaded string // threaded=%d, Fsync string // fsync=%d, FastIno string // fast_ino=%d Writeback string // writeback=%d, NoXattrs string // noxattrs=%d,出 Plugins string // plugins=%s XattrPermissions string // xattr_permissions=%d SquashToRoot bool // squash_to_root SquashToUID string // squash_to_uid=%d, SquashToGID string // squash_to_gid=%d, StaticNlink bool // static_nlink Volatile bool // volatile NoACL bool // noacl Target string // 挂载目标 Flags []string // 额外的标志选项 Args []string // 附加参数 }
type MountOption ¶
func ParseMountOption ¶
func ParseMountOption(item string) MountOption
func (*MountOption) Mount ¶
func (opt *MountOption) Mount() error
Click to show internal directories.
Click to hide internal directories.