types

package
v0.0.0-...-81d58bd Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2024 License: GPL-3.0 Imports: 0 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GroupInfo

type GroupInfo struct {
	// GID is the group's ID
	GID string `json:"gid"`

	// Name is the group's name
	Name string `json:"name"`
}

GroupInfo represents information about a group

type MachineType

type MachineType string

MachineType is the representation of the type of machine

const (
	// VM is a virtual machine
	VM MachineType = "vm"

	// BareMetal is a bare metal machine, like a workstation or server
	BareMetal MachineType = "baremetal"

	// Container is a pretty much self-explanatory
	Container MachineType = "container"
)

type OSReleaseInfo

type OSReleaseInfo struct {
	// Name is the name of the operating system
	Name string

	// Version is the version of the operating system
	Version string

	// Codename is how the operating system is referred to internally
	Codename string
}

OSReleaseInfo is a struct that contains information about the OS release

type Process

type Process struct {
	// PID (Process ID) is the unique identifier for the process
	PID int `json:"pid"`

	// Name is the name of the process
	Name string `json:"name"`

	// State is the current state of the process
	State string `json:"state"`

	// PPID (Parent Process ID) is the PID of the parent process
	PPID int `json:"ppid"`

	// Priority is the priority of the process
	Priority int `json:"priority"`

	// Nice (user-space priority) is the nice value of the process
	Nice int `json:"nice"`

	// Threads is the number of threads in the process
	Threads int `json:"threads"`

	// UID (User ID) is the user ID of the process owner
	UID int `json:"uid"`

	// GID (Group ID) is the group ID of the process owner
	GID int `json:"gid"`
}

Process represents information about a process

type SystemInfo

type SystemInfo struct {
	// OS is the name of the operating system
	OS string

	// Version is the version of the operating system
	Version string

	// Codename is how the operating system is referred to internally
	Codename string

	// Arch is the architecture of the operating system
	Arch string

	// MachineType is the type of machine that the operating system is running
	// on. This can be baremetal, vm or container.
	MachineType MachineType
}

SystemInfo is a struct that contains information about the system

type Timezone

type Timezone struct {
	// Name is the name of the timezone
	Name string `json:"name"`

	// Location is the location of the timezone file
	Location string `json:"location"`
}

Timezone represents a supported timezone

type UserInfo

type UserInfo struct {
	// UID is the user's ID
	UID string `json:"uid"`

	// GID is the user's group ID
	GID string `json:"gid"`

	// Username is the user's username
	Username string `json:"username"`

	// Name is the user's name
	Name string `json:"name"`

	// HomeDir is the user's home directory
	HomeDir string `json:"home_directory"`

	// Shell is the user's configured shell
	Shell string `json:"shell"`
}

UserInfo represents information about a user

Jump to

Keyboard shortcuts

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