windows

package
v3.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildBase64bz2Report

func BuildBase64bz2Report(conf *config.Config) (string, error)

BuildBase64bz2Report will return a compressed and encoded string of our report struct

Types

type HardwareInfo

type HardwareInfo struct {
	MachineModel          string
	CPUType               string
	CurrentProcessorSpeed int
	PhysicalMemory        string
}

HardwareInfo is a subset of MachineInfo

func GetHardwareInfo

func GetHardwareInfo() (*HardwareInfo, error)

GetHardwareInfo creates the necessary structure sal expects

type MachineInfo

type MachineInfo struct {
	OSVers       string
	HardwareInfo *HardwareInfo
}

MachineInfo is required as a top level report field

func EmulateMachineInfo

func EmulateMachineInfo() (*MachineInfo, error)

EmulateMachineInfo copies its behavior from macOS, and provides struct data to Sal

type Win32Bios

type Win32Bios struct {
	PSComputerName string `json:"PSComputerName"`
	SerialNumber   string `json:"SerialNumber"`
}

Win32Bios data structure

func GetWin32Bios

func GetWin32Bios() (Win32Bios, error)

GetWin32Bios exports the win32_bios powershell class

type Win32ComputerSystem

type Win32ComputerSystem struct {
	UserName     string `json:"UserName"`
	Manufacturer string `json:"Manufacturer"`
	Model        string `json:"Model"`
}

Win32ComputerSystem structure

func GetWin32ComputerSystem

func GetWin32ComputerSystem() (Win32ComputerSystem, error)

GetWin32ComputerSystem exports win32_ComputerSystem powershell class

type Win32LogicalDisk

type Win32LogicalDisk struct {
	Name      string `json:"Name"`
	Size      int    `json:"Size"`
	FreeSpace int    `json:"FreeSpace"`
}

Win32LogicalDisk structure

func GetCDrive

func GetCDrive() (Win32LogicalDisk, error)

GetCDrive explicity looks for C Drive

func GetWin32LogicalDisk

func GetWin32LogicalDisk() ([]Win32LogicalDisk, error)

GetWin32LogicalDisk returns an array of powershell class win32_logicaldisk

type Win32OS

type Win32OS struct {
	Caption                string `json:"Caption"` //os version
	TotalVirtualMemorySize int    `json:"TotalVirtualMemorySize"`
	TotalVisibleMemorySize int    `json:"TotalVisibleMemorySize"`
}

Win32OS structure

func GetWin32OS

func GetWin32OS() (Win32OS, error)

GetWin32OS exports win32_operatingsystem powershell class

type Win32Processor

type Win32Processor struct {
	CPUType               string `json:"Name"`
	CurrentProcessorSpeed int    `json:"MaxClockSpeed"`
}

Win32Processor data structure

func GetWin32Processor

func GetWin32Processor() (Win32Processor, error)

GetWin32Processor exports the win32_bios powershell class

Jump to

Keyboard shortcuts

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