usb

package
v0.21.2 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Device

type Device struct {
	Driver     string `json:"driver"`
	Type       string `json:"type"`
	VendorID   string `json:"vendor_id"`
	ProductID  string `json:"product_id"`
	Product    string `json:"product"`
	RevisionID string `json:"revision_id"`
	Interface  string `json:"interface"`
}

func (Device) String

func (d Device) String() string

type Info

type Info struct {
	Devices []*Device `json:"devices"`
	// contains filtered or unexported fields
}

Info describes all network interface controllers (NICs) in the host system.

func New

func New(opts ...*option.Option) (*Info, error)

New returns a pointer to an Info struct that contains information about the network interface controllers (NICs) on the host system

func (*Info) JSONString

func (i *Info) JSONString(indent bool) string

JSONString returns a string with the net information formatted as JSON under a top-level "net:" key

func (*Info) String

func (i *Info) String() string

String returns a short string with information about the networking on the host system.

func (*Info) YAMLString

func (i *Info) YAMLString() string

YAMLString returns a string with the net information formatted as YAML under a top-level "net:" key

Jump to

Keyboard shortcuts

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