Vendor github.com/mdlayher/wifi and dependencies
This commit is contained in:
parent
e9cea11553
commit
82a2b8fc02
34 changed files with 8970 additions and 0 deletions
36
vendor/github.com/mdlayher/wifi/client.go
generated
vendored
Normal file
36
vendor/github.com/mdlayher/wifi/client.go
generated
vendored
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
package wifi
|
||||
|
||||
// A Client is a type which can access WiFi device actions and statistics
|
||||
// using operating system-specific operations.
|
||||
type Client struct {
|
||||
c osClient
|
||||
}
|
||||
|
||||
// New creates a new Client.
|
||||
func New() (*Client, error) {
|
||||
c, err := newClient()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &Client{
|
||||
c: c,
|
||||
}, nil
|
||||
}
|
||||
|
||||
// Interfaces returns a list of the system's WiFi network interfaces.
|
||||
func (c *Client) Interfaces() ([]*Interface, error) {
|
||||
return c.c.Interfaces()
|
||||
}
|
||||
|
||||
// StationInfo retrieves statistics about a WiFi interface operating in
|
||||
// station mode.
|
||||
func (c *Client) StationInfo(ifi *Interface) (*StationInfo, error) {
|
||||
return c.c.StationInfo(ifi)
|
||||
}
|
||||
|
||||
// An osClient is the operating system-specific implementation of Client.
|
||||
type osClient interface {
|
||||
Interfaces() ([]*Interface, error)
|
||||
StationInfo(ifi *Interface) (*StationInfo, error)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue