wmic

package module
v0.0.0-...-782e4ee Latest Latest
Warning

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

Go to latest
Published: May 23, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

README

wmic

wmic is a wrapper package of the WMI command line utility

It is a golang package, inspired by the wmi package of StackExchange. https://github.com/StackExchange/wmi

It is a simplified verison wrapped around the 'wmic' utilit to reduce the dependencies of this package.

Documentation

Rendered for windows/amd64

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseResult

func ParseResult(stdout string, dst interface{}) error

Parse the csv format output of the RunCmd

func RunCmd

func RunCmd(dst interface{}) (string, error)

Execute the wmic command and return the stdout/stderr

Types

type DiskDrive

type DiskDrive struct {
	Caption    string
	DeviceID   string
	Model      string
	Partitions uint
	Size       uint64
}

func GetDiskDriveInfo

func GetDiskDriveInfo() ([]DiskDrive, error)

type Port

type Port struct {
	Caption       string
	EndingAddress uint
}

func GetPortInfo

func GetPortInfo() ([]Port, error)

type Volume

type Volume struct {
	Caption    string
	Capacity   uint64
	BootVolume bool
	Compressed bool
}

func GetVolumeInfo

func GetVolumeInfo() ([]Volume, error)

type WmicCommand

type WmicCommand struct {
	CmdArgs []string
}

Jump to

Keyboard shortcuts

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