inventory

package
v0.0.0-...-702289f Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetHostname

func GetHostname() (string, error)

func GetInventoryJsonMarshal

func GetInventoryJsonMarshal() ([]byte, error)

func GetKernelVersion

func GetKernelVersion() (string, error)

func GetModules

func GetModules() (map[string]interface{}, error)

func GetPackagingSystem

func GetPackagingSystem(distribution_id string) (packaging_system string)

func ParseOSRelease

func ParseOSRelease() (map[string]string, error)

Types

type Distribution

type Distribution struct {
	Id            string `json:"id,omitempty"`
	Version       string `json:"version,omitempty"`
	PrettyName    string `json:"pretty_name,omitempty"`
	PackageSystem string `json:"package_system,omitempty"`
}

func GetDistribution

func GetDistribution() (*Distribution, error)

type Inventory

type Inventory struct {
	Hostname      string                 `json:"hostname,omitempty"`
	Distribution  *Distribution          `json:"distribution,omitempty"`
	KernelVersion string                 `json:"kernel_version,omitempty"`
	InstalledPkgs []Package              `json:"installed_packages,omitempty"`
	Modules       map[string]interface{} `json:"modules,omitempty"`
}

func GetInventory

func GetInventory() (Inventory, error)

type Package

type Package struct {
	Name         string `json:"name"`
	Version      string `json:"version"`
	Architecture string `json:"architecture"`
}

func GetInstalledPackages

func GetInstalledPackages(packaging_system string) ([]Package, error)

Jump to

Keyboard shortcuts

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