os

package
v1.9.9 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyDir

func CopyDir(src, dst string) error

func CopyFile

func CopyFile(src, dst string) error

func GetCpuNum

func GetCpuNum() int

func GetCurrentDirectory

func GetCurrentDirectory() (string, error)

func GetDiskSpace

func GetDiskSpace() (uint64, error)

func GetFreeDiskSpace

func GetFreeDiskSpace() (uint64, error)

func GetHostCurrentUser

func GetHostCurrentUser() (string, error)

func GetHostIP

func GetHostIP() (string, error)

func GetHostTotalMem

func GetHostTotalMem() (uint64, error)

func GetHostUsedMem

func GetHostUsedMem() (uint64, error)

func GetHostname

func GetHostname() (string, error)

func GetOSArch

func GetOSArch() string

func GetOSCurrentUser

func GetOSCurrentUser() (string, error)

func GetOSName

func GetOSName() string

func GetPlatform

func GetPlatform() string

func GetUserHomeDir

func GetUserHomeDir() (string, error)

func GetWorkingDir

func GetWorkingDir() (string, error)

func IToi

func IToi(before interface{}, after interface{}) error

func Mkdir

func Mkdir(dir string) error

Types

type PlatformParameters

type PlatformParameters struct {
	IP            string `json:"ip"`
	OS            string `json:"os"`
	Arch          string `json:"arch"`
	CurrentUser   string `json:"current_user"`
	MemTotal      uint64 `json:"mem_total"`
	UsedMem       uint64 `json:"used_mem"`
	CpuNum        int    `json:"cpu_num"`
	DiskSpace     uint64 `json:"disk_space"`
	FreeDiskSpace uint64 `json:"free_disk_space"`
	Hostname      string `json:"hostname"`
}

func GetPlatformParameters

func GetPlatformParameters() (*PlatformParameters, error)

Jump to

Keyboard shortcuts

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