Update devices

This commit is contained in:
appkins
2025-03-11 20:08:57 -05:00
parent b8cd78c83f
commit 39c704d3ec
3 changed files with 29 additions and 53 deletions

View File

@@ -23,6 +23,31 @@ const (
DeviceStateIsolated DeviceState = 11
)
type LastConnection struct {
Mac string `json:"mac,omitempty"`
LastSeen int `json:"last_seen,omitempty"`
}
type PortTable struct {
PortIdx int `json:"port_idx,omitempty"`
Media string `json:"media,omitempty"`
PortPoe bool `json:"port_poe,omitempty"`
PoeCaps int `json:"poe_caps,omitempty"`
SpeedCaps int `json:"speed_caps,omitempty"`
LastConnection LastConnection `json:"last_connection,omitempty"`
OpMode string `json:"op_mode,omitempty"`
Forward string `json:"forward,omitempty"`
PoeMode string `json:"poe_mode,omitempty"`
FullDuplex bool `json:"full_duplex,omitempty"`
IsUplink bool `json:"is_uplink,omitempty"`
MacTableCount int `json:"mac_table_count,omitempty"`
PoeClass string `json:"poe_class,omitempty"`
PoeCurrent string `json:"poe_current,omitempty"`
PoeEnable bool `json:"poe_enable,omitempty"`
PoeGood bool `json:"poe_good,omitempty"`
PoePower string `json:"poe_power,omitempty"`
PoeVoltage string `json:"poe_voltage,omitempty"`
}
func (c *Client) ListDevice(ctx context.Context, site string) ([]Device, error) {
return c.listDevice(ctx, site)
}