github.com/jaypipes/ghw@v0.21.1/alias.go (about) 1 // 2 // Use and distribution licensed under the Apache license version 2. 3 // 4 // See the COPYING file in the root project directory for full text. 5 // 6 7 package ghw 8 9 import ( 10 "github.com/jaypipes/ghw/pkg/accelerator" 11 "github.com/jaypipes/ghw/pkg/baseboard" 12 "github.com/jaypipes/ghw/pkg/bios" 13 "github.com/jaypipes/ghw/pkg/block" 14 "github.com/jaypipes/ghw/pkg/chassis" 15 "github.com/jaypipes/ghw/pkg/cpu" 16 "github.com/jaypipes/ghw/pkg/gpu" 17 "github.com/jaypipes/ghw/pkg/memory" 18 "github.com/jaypipes/ghw/pkg/net" 19 "github.com/jaypipes/ghw/pkg/option" 20 "github.com/jaypipes/ghw/pkg/pci" 21 pciaddress "github.com/jaypipes/ghw/pkg/pci/address" 22 "github.com/jaypipes/ghw/pkg/product" 23 "github.com/jaypipes/ghw/pkg/topology" 24 "github.com/jaypipes/ghw/pkg/usb" 25 ) 26 27 type WithOption = option.Option 28 29 var ( 30 WithChroot = option.WithChroot 31 WithSnapshot = option.WithSnapshot 32 WithAlerter = option.WithAlerter 33 WithNullAlerter = option.WithNullAlerter 34 // match the existing environ variable to minimize surprises 35 WithDisableWarnings = option.WithNullAlerter 36 WithDisableTools = option.WithDisableTools 37 WithPathOverrides = option.WithPathOverrides 38 ) 39 40 type SnapshotOptions = option.SnapshotOptions 41 42 type PathOverrides = option.PathOverrides 43 44 type CPUInfo = cpu.Info 45 46 var ( 47 CPU = cpu.New 48 ) 49 50 type MemoryArea = memory.Area 51 type MemoryInfo = memory.Info 52 type MemoryCache = memory.Cache 53 type MemoryCacheType = memory.CacheType 54 type MemoryModule = memory.Module 55 56 const ( 57 MemoryCacheTypeUnified = memory.CacheTypeUnified 58 // DEPRECATED: Please use MemoryCacheTypeUnified 59 MEMORY_CACHE_TYPE_UNIFIED = memory.CACHE_TYPE_UNIFIED 60 MemoryCacheTypeInstruction = memory.CacheTypeInstruction 61 // DEPRECATED: Please use MemoryCacheTypeInstruction 62 MEMORY_CACHE_TYPE_INSTRUCTION = memory.CACHE_TYPE_INSTRUCTION 63 MemoryCacheTypeData = memory.CacheTypeData 64 // DEPRECATED: Please use MemoryCacheTypeData 65 MEMORY_CACHE_TYPE_DATA = memory.CACHE_TYPE_DATA 66 ) 67 68 var ( 69 Memory = memory.New 70 ) 71 72 var ( 73 USB = usb.New 74 ) 75 76 type BlockInfo = block.Info 77 type Disk = block.Disk 78 type Partition = block.Partition 79 80 var ( 81 Block = block.New 82 ) 83 84 type DriveType = block.DriveType 85 86 const ( 87 DriveTypeUnknown = block.DriveTypeUnknown 88 // DEPRECATED: Please use DriveTypeUnknown 89 DRIVE_TYPE_UNKNOWN = block.DRIVE_TYPE_UNKNOWN 90 DriveTypeHDD = block.DriveTypeHDD 91 // DEPRECATED: Please use DriveTypeHDD 92 DRIVE_TYPE_HDD = block.DRIVE_TYPE_HDD 93 DriveTypeFDD = block.DriveTypeFDD 94 // DEPRECATED: Please use DriveTypeFDD 95 DRIVE_TYPE_FDD = block.DRIVE_TYPE_FDD 96 DriveTypeODD = block.DriveTypeODD 97 // DEPRECATED: Please use DriveTypeODD 98 DRIVE_TYPE_ODD = block.DRIVE_TYPE_ODD 99 DriveTypeSSD = block.DriveTypeSSD 100 // DEPRECATED: Please use DriveTypeSSD 101 DRIVE_TYPE_SSD = block.DRIVE_TYPE_SSD 102 ) 103 104 type StorageController = block.StorageController 105 106 const ( 107 StorageControllerUnknown = block.StorageControllerUnknown 108 // DEPRECATED: Please use StorageControllerUnknown 109 STORAGE_CONTROLLER_UNKNOWN = block.STORAGE_CONTROLLER_UNKNOWN 110 StorageControllerIDE = block.StorageControllerIDE 111 // DEPRECATED: Please use StorageControllerIDE 112 STORAGE_CONTROLLER_IDE = block.STORAGE_CONTROLLER_IDE 113 StorageControllerSCSI = block.StorageControllerSCSI 114 // DEPRECATED: Please use StorageControllerSCSI 115 STORAGE_CONTROLLER_SCSI = block.STORAGE_CONTROLLER_SCSI 116 StorageControllerNVMe = block.StorageControllerNVMe 117 // DEPRECATED: Please use StorageControllerNVMe 118 STORAGE_CONTROLLER_NVME = block.STORAGE_CONTROLLER_NVME 119 StorageControllerVirtIO = block.StorageControllerVirtIO 120 // DEPRECATED: Please use StorageControllerVirtIO 121 STORAGE_CONTROLLER_VIRTIO = block.STORAGE_CONTROLLER_VIRTIO 122 StorageControllerMMC = block.StorageControllerMMC 123 // DEPRECATED: Please use StorageControllerMMC 124 STORAGE_CONTROLLER_MMC = block.STORAGE_CONTROLLER_MMC 125 ) 126 127 type NetworkInfo = net.Info 128 type NIC = net.NIC 129 type NICCapability = net.NICCapability 130 131 var ( 132 Network = net.New 133 ) 134 135 type BIOSInfo = bios.Info 136 137 var ( 138 BIOS = bios.New 139 ) 140 141 type ChassisInfo = chassis.Info 142 143 var ( 144 Chassis = chassis.New 145 ) 146 147 type BaseboardInfo = baseboard.Info 148 149 var ( 150 Baseboard = baseboard.New 151 ) 152 153 type TopologyInfo = topology.Info 154 type TopologyNode = topology.Node 155 156 var ( 157 Topology = topology.New 158 ) 159 160 type Architecture = topology.Architecture 161 162 const ( 163 ArchitectureSMP = topology.ArchitectureSMP 164 // DEPRECATED: Please use ArchitectureSMP 165 ARCHITECTURE_SMP = topology.ArchitectureSMP 166 ArchitectureNUMA = topology.ArchitectureNUMA 167 // DEPRECATED: Please use ArchitectureNUMA 168 ARCHITECTURE_NUMA = topology.ArchitectureNUMA 169 ) 170 171 type PCIInfo = pci.Info 172 type PCIAddress = pciaddress.Address 173 type PCIDevice = pci.Device 174 175 var ( 176 PCI = pci.New 177 PCIAddressFromString = pciaddress.FromString 178 ) 179 180 type ProductInfo = product.Info 181 182 var ( 183 Product = product.New 184 ) 185 186 type GPUInfo = gpu.Info 187 type GraphicsCard = gpu.GraphicsCard 188 189 var ( 190 GPU = gpu.New 191 ) 192 193 type AcceleratorInfo = accelerator.Info 194 type AcceleratorDevice = accelerator.AcceleratorDevice 195 196 var ( 197 Accelerator = accelerator.New 198 )