{"modulePath":"github.com/mintoolkit/mint","version":"v0.0.0-20261102071007-1bc8c79add0d","isLatest":true,"isStandardLibrary":false,"goos":"linux","goarch":"amd64","docs":"# package system\n\n## Constants\n\n```go\nconst (\n\tOSShellAshExePath    = \"/bin/ash\"\n\tOSShellBourneExePath = \"/bin/sh\"\n\tOSShellKornExePath   = \"/bin/ksh93\"\n\t//usually a link to /bin/ksh93\n\tOSShellRestrictedKornExePath = \"/bin/rksh93\"\n\t//usually a link to /etc/alternatives/ksh\n\t//which links to /bin/ksh93\n\tOSShellKorn2ExePath = \"/bin/ksh\"\n\tOSShellBashExePath  = \"/bin/bash\"\n\t//usually a link to /bin/bash\n\tOSShellRestrictedBashExePath = \"/bin/rbash\"\n\tOSShellDashExePath           = \"/bin/dash\"\n\tOSShellZExePath              = \"/bin/zsh\"\n\t//usually a link to /bin/zsh\n\tOSShellZ2ExePath       = \"/usr/bin/zsh\"\n\tOSShellCExePath        = \"/bin/csh\"\n\tOSShellTCExePath       = \"/bin/tcsh\"\n\tOSShellFishExePath     = \"/usr/bin/fish\"\n\tOSShellElvishExePath   = \"/usr/bin/elvish\"\n\tOSShellXonshExePath    = \"/usr/bin/xonsh\"\n\tOSShellYashExePath     = \"/usr/bin/yash\"\n\tOSShellGitShellExePath = \"/usr/bin/git-shell\"\n\tOSShellScreenExePath   = \"/usr/bin/screen\"\n\tOSShellTmuxExePath     = \"/usr/bin/tmux\"\n)\n```\nCommon linux shell exe paths\n\n```go\nconst (\n\tSyscallX86MinNum      = 0\n\tSyscallX86UnknownNum  = -1\n\tSyscallX86UnknownName = \"unknown_syscall\"\n)\n```\n\n```go\nconst (\n\tSyscallArmUnknownNum  = -1\n\tSyscallArmUnknownName = \"unknown_syscall\"\n\tSyscallArmMinNum32    = 0\n\tSyscallArmMaxNum32    = 472\n\tSyscallArmLastName32  = \"fchroot\"\n)\n```\n\n```go\nconst (\n\tSyscallArmUnknownNum64  = -1\n\tSyscallArmUnknownName64 = \"unknown_syscall\"\n\tSyscallArmMinNum64      = 0\n\tSyscallArmMaxNum64      = 472\n\tSyscallArmLastName64    = \"fchroot\"\n)\n```\n\n```go\nconst (\n\tSyscallX86MaxNum32   = 472\n\tSyscallX86LastName32 = \"fchroot\"\n)\n```\n\n```go\nconst (\n\tSyscallX86MaxNum64   = 472\n\tSyscallX86LastName64 = \"fchroot\"\n)\n```\n\n```go\nconst (\n\tOSShellsFile = \"/etc/shells\"\n)\n```\n\n## Variables\n\n```go\nvar (\n\tErrNotConfigured    = errors.New(\"feature is not configured\")\n\tErrNoConfigs        = errors.New(\"no kernel configs\")\n\tErrArchNotSupported = errors.New(\"unsupported architecture\")\n)\n```\n\n```go\nvar ArmFamily32Arch = ArchInfo{\n\tName:   ArchNameArm32,\n\tFamily: ArchFamilyArm,\n\tBits:   ArchBits32,\n}\n```\n\n```go\nvar ArmFamily64Arch = ArchInfo{\n\tName:   ArchNameArm64,\n\tFamily: ArchFamilyArm,\n\tBits:   ArchBits64,\n}\n```\n\n```go\nvar DefaultKernelFeatures, _ = NewKernelFeatures()\n```\n\n```go\nvar OSShellReferences = map[string]string{\n\tOSShellBourneExePath:         OSShellBourneExePath,\n\tOSShellKornExePath:           OSShellKornExePath,\n\tOSShellKorn2ExePath:          OSShellKornExePath,\n\tOSShellRestrictedKornExePath: OSShellKornExePath,\n\tOSShellBashExePath:           OSShellBashExePath,\n\tOSShellRestrictedBashExePath: OSShellBashExePath,\n\tOSShellDashExePath:           OSShellDashExePath,\n\tOSShellZExePath:              OSShellZExePath,\n\tOSShellZ2ExePath:             OSShellZExePath,\n\tOSShellCExePath:              OSShellCExePath,\n\tOSShellTCExePath:             OSShellTCExePath,\n\tOSShellFishExePath:           OSShellFishExePath,\n\tOSShellElvishExePath:         OSShellElvishExePath,\n\tOSShellXonshExePath:          OSShellXonshExePath,\n\tOSShellYashExePath:           OSShellYashExePath,\n\tOSShellAshExePath:            OSShellAshExePath,\n\tOSShellGitShellExePath:       OSShellGitShellExePath,\n\tOSShellScreenExePath:         OSShellScreenExePath,\n\tOSShellTmuxExePath:           OSShellTmuxExePath,\n}\n```\n\n```go\nvar OSShells = map[string]OSShell{\n\tOSShellBourneExePath: {\n\t\tFullName:  \"Bourne shell\",\n\t\tShortName: \"sh\",\n\t\tExePath:   OSShellBourneExePath,\n\t},\n\tOSShellKornExePath: {\n\t\tFullName:  \"Korn shell\",\n\t\tShortName: \"ksh\",\n\t\tExePath:   OSShellKornExePath,\n\t},\n\tOSShellBashExePath: {\n\t\tFullName:  \"Bash shell\",\n\t\tShortName: \"bash\",\n\t\tExePath:   OSShellBashExePath,\n\t},\n\tOSShellDashExePath: {\n\t\tFullName:  \"Dash shell\",\n\t\tShortName: \"dash\",\n\t\tExePath:   OSShellDashExePath,\n\t},\n\tOSShellZExePath: {\n\t\tFullName:  \"Z shell\",\n\t\tShortName: \"zsh\",\n\t\tExePath:   OSShellZExePath,\n\t},\n\tOSShellCExePath: {\n\t\tFullName:  \"C shell\",\n\t\tShortName: \"csh\",\n\t\tExePath:   OSShellCExePath,\n\t},\n\tOSShellTCExePath: {\n\t\tFullName:  \"TC shell\",\n\t\tShortName: \"tcsh\",\n\t\tExePath:   OSShellTCExePath,\n\t},\n\tOSShellFishExePath: {\n\t\tFullName:  \"Fish shell\",\n\t\tShortName: \"fish\",\n\t\tExePath:   OSShellFishExePath,\n\t},\n\tOSShellElvishExePath: {\n\t\tFullName:  \"Elvish shell\",\n\t\tShortName: \"elvish\",\n\t\tExePath:   OSShellElvishExePath,\n\t},\n\tOSShellXonshExePath: {\n\t\tFullName:  \"Xonsh shell\",\n\t\tShortName: \"xonsh\",\n\t\tExePath:   OSShellXonshExePath,\n\t},\n\tOSShellYashExePath: {\n\t\tFullName:  \"Yash shell\",\n\t\tShortName: \"yash\",\n\t\tExePath:   OSShellYashExePath,\n\t},\n\tOSShellAshExePath: {\n\t\tFullName:  \"Ash shell\",\n\t\tShortName: \"ash\",\n\t\tExePath:   OSShellAshExePath,\n\t},\n\n\tOSShellGitShellExePath: {\n\t\tFullName:  \"Git shell\",\n\t\tShortName: \"git-shell\",\n\t\tExePath:   OSShellGitShellExePath,\n\t},\n\tOSShellScreenExePath: {\n\t\tFullName:  \"Screen\",\n\t\tShortName: \"screen\",\n\t\tExePath:   OSShellScreenExePath,\n\t},\n\tOSShellTmuxExePath: {\n\t\tFullName:  \"Tmux\",\n\t\tShortName: \"tmux\",\n\t\tExePath:   OSShellTmuxExePath,\n\t},\n}\n```\n\n## Functions\n\n```go\nfunc CallFirstParam(regs syscall.PtraceRegs) uint64\n```\n\n```go\nfunc CallFourthParam(regs syscall.PtraceRegs) uint64\n```\n\n```go\nfunc CallNumber(regs syscall.PtraceRegs) uint64\n```\n\n```go\nfunc CallReturnValue(regs syscall.PtraceRegs) uint64\n```\n\n```go\nfunc CallSecondParam(regs syscall.PtraceRegs) uint64\n```\n\n```go\nfunc CallThirdParam(regs syscall.PtraceRegs) uint64\n```\n\n```go\nfunc IsOSShellsFile(name string) bool\n```\n\n```go\nfunc IsShellExePath(name string) bool\n```\n\n```go\nfunc LookupCallName(num uint32) string\n```\n\n```go\nfunc LookupCallNumber(name string) (uint32, bool)\n```\n\n```go\nfunc ResolveGroup(identity string) (uint32, error)\n```\n\n```go\nfunc ResolveUser(identity string) (uid uint32, gid uint32, home string, err error)\n```\n\n## Types\n\n```go\ntype ArchBits uint8\n```\n\n```go\nconst (\n\tArchBits32 ArchBits = 32\n\tArchBits64 ArchBits = 64\n)\n```\n\n```go\ntype ArchFamily string\n```\n\n```go\nconst (\n\tArchFamilyX86   ArchFamily = \"x86\"\n\tArchFamilyArm   ArchFamily = \"arm\"\n\tArchFamilyArm64 ArchFamily = \"arm64\"\n)\n```\n\n```go\ntype ArchInfo struct {\n\tName   ArchName\n\tFamily ArchFamily\n\tBits   ArchBits\n}\n```\n\n```go\nfunc MachineToArch(mtype string) *ArchInfo\n```\n\n```go\ntype ArchName string\n```\n\n```go\nconst (\n\tArchNameUnknown     ArchName = \"unknown\"\n\tArchNameUnsupported ArchName = \"unsupported\"\n\tArchName386         ArchName = \"386\"\n\tArchNameAmd64       ArchName = \"amd64\"\n\tArchNameArm32       ArchName = \"armhf\"\n\tArchNameArm64       ArchName = \"aarch64\"\n)\n```\n\n```go\nfunc MachineToArchName(mtype string) ArchName\n```\n\n```go\ntype DistroInfo struct {\n\tName        string `json:\"name\"`\n\tVersion     string `json:\"version\"`\n\tDisplayName string `json:\"display_name\"`\n}\n```\n\n```go\ntype KernelFeatures struct {\n\tRaw   map[string]string\n\tError string\n}\n```\n\n```go\nfunc NewKernelFeatures() (KernelFeatures, error)\n```\n\n```go\nfunc NewKernelFeaturesWithProps(location string) (KernelFeatures, error)\n```\n\n```go\nfunc (p *KernelFeatures) IsCompiled(name string) (bool, error)\n```\n\n```go\nfunc (p *KernelFeatures) IsConfigured(name string) bool\n```\n\n```go\nfunc (p *KernelFeatures) IsFlag(name string) (bool, error)\n```\n\n```go\nfunc (p *KernelFeatures) IsLoadable(name string) (bool, error)\n```\n\n```go\nfunc (p *KernelFeatures) RawValue(name string) (string, error)\n```\n\n```go\ntype MachineName string\n```\n\n```go\nconst (\n\tMachineNameNamei386   MachineName = \"i386\"\n\tMachineNameNamei586   MachineName = \"i586\"\n\tMachineNameNamei686   MachineName = \"i686\"\n\tMachineNameNamex86_64 MachineName = \"x86_64\"\n\tMachineNameNameArm    MachineName = \"armv7l\"\n\tMachineNameNameArm64  MachineName = \"aarch64\"\n)\n```\n\n```go\ntype NameResolverFunc func(string) (uint32, bool)\n```\n\n```go\nfunc CallNameResolver(arch ArchName) NameResolverFunc\n```\n\n```go\ntype NumberResolverFunc func(uint32) string\n```\n\n```go\nfunc CallNumberResolver(arch ArchName) NumberResolverFunc\n```\n\n```go\ntype OSShell struct {\n\tFullName  string `json:\"full_name\"`\n\tShortName string `json:\"short_name,omitempty\"`\n\tExePath   string `json:\"exe_path\"`\n\tLinkPath  string `json:\"link_path,omitempty\"`\n\tReference string `json:\"reference,omitempty\"`\n\tVerified  bool   `json:\"verified,omitempty\"`\n}\n```\n\n```go\nfunc LookupShellByExePath(name string) *OSShell\n```\n\n```go\nfunc NewOSShells(verify bool) ([]*OSShell, error)\n```\n\n```go\nfunc NewOSShellsFromData(raw []byte) ([]*OSShell, error)\n```\n\n```go\nfunc ParseOSShells(raw []byte) []*OSShell\n```\n\n```go\ntype SystemInfo struct {\n\tSysname    string\n\tNodename   string\n\tRelease    string\n\tVersion    string\n\tMachine    string\n\tDomainname string\n\tOsBuild    string\n\tDistro     DistroInfo\n}\n```\n\n```go\nfunc GetSystemInfo() SystemInfo\n```\n\n","path":"github.com/mintoolkit/mint/pkg/system","name":"system","synopsis":"","isRedistributable":true}
