Documentation ¶
Index ¶
- Constants
- func CreateInveroryInfo() []byte
- func GetBmcAddress(dependencies IDependencies) string
- func GetBmcV6Address(dependencies IDependencies) string
- func GetBoot(dependencies IDependencies) *models.Boot
- func GetCPU(dependencies IDependencies) *models.CPU
- func GetDisks(dependencies IDependencies) []*models.Disk
- func GetHostname(dependencies IDependencies) string
- func GetInterfaces(depenndecies IDependencies) []*models.Interface
- func GetMemory(dependencies IDependencies) *models.Memory
- func GetVendor(dependencies IDependencies) *models.SystemVendor
- func ReadInventory() *models.Inventory
- type Dependencies
- func (d *Dependencies) Abs(path string) (string, error)
- func (d *Dependencies) Block(opts ...*ghw.WithOption) (*ghw.BlockInfo, error)
- func (d *Dependencies) EvalSymlinks(path string) (string, error)
- func (d *Dependencies) Execute(command string, args ...string) (stdout string, stderr string, exitCode int)
- func (d *Dependencies) Hostname() (string, error)
- func (d *Dependencies) Interfaces() ([]Interface, error)
- func (d *Dependencies) ReadDir(dirname string) ([]os.FileInfo, error)
- func (d *Dependencies) ReadFile(fname string) ([]byte, error)
- func (d *Dependencies) Stat(fname string) (os.FileInfo, error)
- type IDependencies
- type Interface
- type MockIDependencies
- func (_m *MockIDependencies) Abs(path string) (string, error)
- func (_m *MockIDependencies) Block(opts ...*ghw.WithOption) (*ghw.BlockInfo, error)
- func (_m *MockIDependencies) EvalSymlinks(path string) (string, error)
- func (_m *MockIDependencies) Execute(command string, args ...string) (string, string, int)
- func (_m *MockIDependencies) Hostname() (string, error)
- func (_m *MockIDependencies) Interfaces() ([]Interface, error)
- func (_m *MockIDependencies) ReadDir(dirname string) ([]os.FileInfo, error)
- func (_m *MockIDependencies) ReadFile(fname string) ([]byte, error)
- func (_m *MockIDependencies) Stat(fname string) (os.FileInfo, error)
- type MockInterface
- func (_m *MockInterface) Addrs() ([]net.Addr, error)
- func (_m *MockInterface) Flags() net.Flags
- func (_m *MockInterface) HardwareAddr() net.HardwareAddr
- func (_m *MockInterface) IsPhysical() bool
- func (_m *MockInterface) MTU() int
- func (_m *MockInterface) Name() string
- func (_m *MockInterface) SpeedMbps() int64
- type NetworkInterface
- func (n *NetworkInterface) Addrs() ([]net.Addr, error)
- func (n *NetworkInterface) Flags() net.Flags
- func (n *NetworkInterface) HardwareAddr() net.HardwareAddr
- func (n *NetworkInterface) IsPhysical() bool
- func (n *NetworkInterface) MTU() int
- func (n *NetworkInterface) Name() string
- func (n *NetworkInterface) SpeedMbps() int64
Constants ¶
const ( BytesMultiplier int64 = 1 KbMultiplier = BytesMultiplier << 10 MbMultiplier = KbMultiplier << 10 GbMultiplier = MbMultiplier << 10 TbMultiplier = GbMultiplier << 10 EbMultiplier = TbMultiplier << 10 ZbMultiplier = EbMultiplier << 10 )
const MaxIpmiChannel = 12
Variables ¶
This section is empty.
Functions ¶
func CreateInveroryInfo ¶
func CreateInveroryInfo() []byte
func GetBmcAddress ¶
func GetBmcAddress(dependencies IDependencies) string
func GetBmcV6Address ¶
func GetBmcV6Address(dependencies IDependencies) string
func GetBoot ¶
func GetBoot(dependencies IDependencies) *models.Boot
func GetCPU ¶
func GetCPU(dependencies IDependencies) *models.CPU
func GetDisks ¶
func GetDisks(dependencies IDependencies) []*models.Disk
func GetHostname ¶
func GetHostname(dependencies IDependencies) string
func GetInterfaces ¶
func GetInterfaces(depenndecies IDependencies) []*models.Interface
func GetMemory ¶
func GetMemory(dependencies IDependencies) *models.Memory
func GetVendor ¶
func GetVendor(dependencies IDependencies) *models.SystemVendor
func ReadInventory ¶
Types ¶
type Dependencies ¶
type Dependencies struct{}
func (*Dependencies) Block ¶
func (d *Dependencies) Block(opts ...*ghw.WithOption) (*ghw.BlockInfo, error)
func (*Dependencies) EvalSymlinks ¶
func (d *Dependencies) EvalSymlinks(path string) (string, error)
func (*Dependencies) Hostname ¶
func (d *Dependencies) Hostname() (string, error)
func (*Dependencies) Interfaces ¶
func (d *Dependencies) Interfaces() ([]Interface, error)
type IDependencies ¶
type IDependencies interface { Execute(command string, args ...string) (stdout string, stderr string, exitCode int) ReadFile(fname string) ([]byte, error) Stat(fname string) (os.FileInfo, error) Hostname() (string, error) Interfaces() ([]Interface, error) Block(opts ...*ghw.WithOption) (*ghw.BlockInfo, error) ReadDir(dirname string) ([]os.FileInfo, error) Abs(path string) (string, error) EvalSymlinks(path string) (string, error) }
type MockIDependencies ¶
MockIDependencies is an autogenerated mock type for the IDependencies type
func (*MockIDependencies) Abs ¶
func (_m *MockIDependencies) Abs(path string) (string, error)
Abs provides a mock function with given fields: path
func (*MockIDependencies) Block ¶
func (_m *MockIDependencies) Block(opts ...*ghw.WithOption) (*ghw.BlockInfo, error)
Block provides a mock function with given fields: opts
func (*MockIDependencies) EvalSymlinks ¶
func (_m *MockIDependencies) EvalSymlinks(path string) (string, error)
EvalSymlinks provides a mock function with given fields: path
func (*MockIDependencies) Execute ¶
Execute provides a mock function with given fields: command, args
func (*MockIDependencies) Hostname ¶
func (_m *MockIDependencies) Hostname() (string, error)
Hostname provides a mock function with given fields:
func (*MockIDependencies) Interfaces ¶
func (_m *MockIDependencies) Interfaces() ([]Interface, error)
Interfaces provides a mock function with given fields:
func (*MockIDependencies) ReadDir ¶
func (_m *MockIDependencies) ReadDir(dirname string) ([]os.FileInfo, error)
ReadDir provides a mock function with given fields: dirname
type MockInterface ¶
MockInterface is an autogenerated mock type for the Interface type
func (*MockInterface) Addrs ¶
func (_m *MockInterface) Addrs() ([]net.Addr, error)
Addrs provides a mock function with given fields:
func (*MockInterface) Flags ¶
func (_m *MockInterface) Flags() net.Flags
Flags provides a mock function with given fields:
func (*MockInterface) HardwareAddr ¶
func (_m *MockInterface) HardwareAddr() net.HardwareAddr
HardwareAddr provides a mock function with given fields:
func (*MockInterface) IsPhysical ¶
func (_m *MockInterface) IsPhysical() bool
IsPhysical provides a mock function with given fields:
func (*MockInterface) MTU ¶
func (_m *MockInterface) MTU() int
MTU provides a mock function with given fields:
func (*MockInterface) Name ¶
func (_m *MockInterface) Name() string
Name provides a mock function with given fields:
func (*MockInterface) SpeedMbps ¶
func (_m *MockInterface) SpeedMbps() int64
SpeedMbps provides a mock function with given fields:
type NetworkInterface ¶
type NetworkInterface struct {
// contains filtered or unexported fields
}
func (*NetworkInterface) Flags ¶
func (n *NetworkInterface) Flags() net.Flags
func (*NetworkInterface) HardwareAddr ¶
func (n *NetworkInterface) HardwareAddr() net.HardwareAddr
func (*NetworkInterface) IsPhysical ¶
func (n *NetworkInterface) IsPhysical() bool
func (*NetworkInterface) MTU ¶
func (n *NetworkInterface) MTU() int
func (*NetworkInterface) Name ¶
func (n *NetworkInterface) Name() string
func (*NetworkInterface) SpeedMbps ¶
func (n *NetworkInterface) SpeedMbps() int64