github.com/u-root/u-root@v7.0.1-0.20200915234505-ad7babab0a8e+incompatible/pkg/pci/types.go (about) 1 // Copyright 2012-2017 the u-root Authors. All rights reserved 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 package pci 6 7 // Filter can be used to filter a device 8 type Filter func(p *PCI) bool 9 10 // BusReader is the interface for reading device names for a given bus. 11 type BusReader interface { 12 // Read returns Devices, possibly filter by a provided ...Filter 13 Read(...Filter) (Devices, error) 14 } 15 16 // Vendor is a PCI vendor human readable label. It contains a map of one or 17 // more Devices keyed by hex ID. 18 type Vendor struct { 19 Name string 20 Devices map[string]Device 21 } 22 23 // Device is a PCI device human readable label 24 type Device string