builtin

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2018 License: Apache-2.0 Imports: 30 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	HandlerP = regexp.MustCompile(`handle (\d+)$`)
)

Functions

func DMITypeToString added in v1.2.2

func DMITypeToString(t DMIType) string

DMITypeToString returns string representation of DMIType t

Types

type BlockDevice added in v1.2.2

type BlockDevice struct {
	Path  string // full path to reach the blockdevice
	Name  string // internal kernel name (can be used in /sys/block/...)
	Type  string // block type (disk, partition, ...)
	Major uint32 // device major id
	Minor uint32 // device minor id
}

type BridgeAddHost

type BridgeAddHost struct {
	Bridge string `json:"bridge"`
	IP     string `json:"ip"`
	Mac    string `json:"mac"`
}

type BridgeCreateArguments

type BridgeCreateArguments struct {
	Name      string        `json:"name"`
	HwAddress string        `json:"hwaddr"`
	Network   BridgeNetwork `json:"network"`
}

func (*BridgeCreateArguments) Validate

func (br *BridgeCreateArguments) Validate() error

type BridgeDeleteArguments

type BridgeDeleteArguments struct {
	Name string `json:"name"`
}

type BridgeNetwork

type BridgeNetwork struct {
	Mode     BridgeNetworkMode `json:"mode"`
	Nat      bool              `json:"nat"`
	Settings json.RawMessage   `json:"settings"`
}

type BridgeNetworkMode

type BridgeNetworkMode string
const (
	NoneBridgeNetworkMode    BridgeNetworkMode = ""
	DnsMasqBridgeNetworkMode BridgeNetworkMode = "dnsmasq"
	StaticBridgeNetworkMode  BridgeNetworkMode = "static"
)

type DMI added in v1.2.2

type DMI map[string]DMISection

Property in section is in the form of key value pairs where values are optional and may include a list of items as well. k: [v]

[
	item1
	item2
	...
]

func ParseDMI added in v1.2.2

func ParseDMI(input string) (DMI, error)

ParseDMI Parses dmidecode output into DMI structure

type DMISection added in v1.2.2

type DMISection struct {
	HandleLine string                  `json:"handleline"`
	Title      string                  `json:"title"`
	TypeStr    string                  `json:"typestr,omitempty"`
	Type       DMIType                 `json:"typenum"`
	Properties map[string]PropertyData `json:"properties,omitempty"`
}

DMISection represents a complete section like BIOS or Baseboard

type DMIType added in v1.2.2

type DMIType int

DMIType (allowed types 0 -> 42)

const (
	DMITypeBIOS DMIType = iota
	DMITypeSystem
	DMITypeBaseboard
	DMITypeChassis
	DMITypeProcessor
	DMITypeMemoryController
	DMITypeMemoryModule
	DMITypeCache
	DMITypePortConnector
	DMITypeSystemSlots
	DMITypeOnBoardDevices
	DMITypeOEMSettings
	DMITypeSystemConfigurationOptions
	DMITypeBIOSLanguage
	DMITypeGroupAssociations
	DMITypeSystemEventLog
	DMITypePhysicalMemoryArray
	DMITypeMemoryDevice
	DMIType32BitMemoryError
	DMITypeMemoryArrayMappedAddress
	DMITypeMemoryDeviceMappedAddress
	DMITypeBuiltinPointingDevice
	DMITypePortableBattery
	DMITypeSystemReset
	DMITypeHardwareSecurity
	DMITypeSystemPowerControls
	DMITypeVoltageProbe
	DMITypeCoolingDevice
	DMITypeTemperatureProbe
	DMITypeElectricalCurrentProbe
	DMITypeOutOfBandRemoteAccess
	DMITypeBootIntegrityServices
	DMITypeSystemBoot
	DMIType64BitMemoryError
	DMITypeManagementDevice
	DMITypeManagementDeviceComponent
	DMITypeManagementDeviceThresholdData
	DMITypeMemoryChannel
	DMITypeIPMIDevice
	DMITypePowerSupply
	DMITypeAdditionalInformation
	DMITypeOnboardDevicesExtendedInformation
	DMITypeManagementControllerHostInterface
)

type DiskFreeBlock

type DiskFreeBlock struct {
	Start uint64 `json:"start"`
	End   uint64 `json:"end"`
	Size  uint64 `json:"size"`
}

type DiskInfoResult

type DiskInfoResult struct {
	Start     uint64          `json:"start"`
	End       uint64          `json:"end"`
	Size      uint64          `json:"size"`
	BlockSize uint64          `json:"blocksize"`
	Table     string          `json:"table"`
	Free      []DiskFreeBlock `json:"free"`
	// contains filtered or unexported fields
}

type LogLevel

type LogLevel struct {
	Level string `json:"level"`
}

type NetworkDnsMasqSettings

type NetworkDnsMasqSettings struct {
	NetworkStaticSettings
	Start net.IP `json:"start"`
	End   net.IP `json:"end"`
}

func (*NetworkDnsMasqSettings) Validate

func (n *NetworkDnsMasqSettings) Validate() error

type NetworkStaticSettings

type NetworkStaticSettings struct {
	CIDR string `json:"cidr"`
}

func (*NetworkStaticSettings) Validate

func (n *NetworkStaticSettings) Validate() error

type Pair

type Pair [2]string

type Port

type Port struct {
	Port      int    `json:"port"`
	Interface string `json:"interface,omitempty"`
	Subnet    string `json:"subnet,omitempty"`
}

type PropertyData added in v1.2.2

type PropertyData struct {
	Val   string   `json:"value"`
	Items []string `json:"items,omitempty"`
}

PropertyData represents a key value pair with optional list of items

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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