Documentation ¶
Index ¶
- Constants
- type AuthTransport
- type Client
- func (c *Client) Do(method, path string, query, value interface{}) error
- func (c *Client) DoWithRetry(req *http.Request, value interface{}) error
- func (c *Client) Login() error
- func (c *Client) NewRequest(method, path string, body io.Reader) (*http.Request, error)
- func (c *Client) ObjectDeviceByIP(ip string) (DeviceDetails, error)
- func (c *Client) ReportsDeviceAddrNoDns() ([]Device, error)
- func (c *Client) ReportsDeviceByLocation() ([]Device, error)
- func (c *Client) ReportsDeviceDnsMismatch() ([]Device, error)
- func (c *Client) ReportsDevicePoeStatus() ([]DevicePoeStatus, error)
- func (c *Client) ReportsDevicePortUtilization(req *MarkAsFreeIfDownForRequest) ([]PortUtilization, error)
- func (c *Client) ReportsNodeMultiIps() ([]NodeIPCount, error)
- func (c *Client) ReportsPortAdminDown() ([]PortAdminDown, error)
- func (c *Client) ReportsPortErrorDisabled() ([]PortErrorDisabled, error)
- func (c *Client) ReportsPortHalfDuplex() ([]PortHalfDuplex, error)
- func (c *Client) ReportsPortMultiNodes(filterByVlan int) ([]PortMultiNodes, error)
- func (c *Client) ReportsPortVlanMismatch() ([]PortVlanMismatch, error)
- func (c *Client) SearchDevice(query *SearchDeviceQuery) ([]Device, error)
- func (c *Client) UnmarshalResponse(resp *http.Response, value interface{}, validResponseCode ...int) error
- type Device
- type DeviceDetails
- type DevicePoeStatus
- type Float64String
- type MarkAsFreeIfDownForRequest
- type NodeIPCount
- type PortAdminDown
- type PortErrorDisabled
- type PortHalfDuplex
- type PortMultiNodes
- type PortUtilization
- type PortVlanMismatch
- type SearchDeviceQuery
Constants ¶
View Source
const SeparatorByte byte = 255
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthTransport ¶
type AuthTransport struct { ApiKey string WrapTransport http.RoundTripper }
func NewTransport ¶
func NewTransport(apiKey string, insecureSkipVerify bool) *AuthTransport
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClientWithApiKey ¶ added in v0.2.0
func (*Client) DoWithRetry ¶
func (*Client) NewRequest ¶
func (*Client) ObjectDeviceByIP ¶ added in v0.2.0
func (c *Client) ObjectDeviceByIP(ip string) (DeviceDetails, error)
func (*Client) ReportsDeviceAddrNoDns ¶ added in v0.2.0
func (*Client) ReportsDeviceByLocation ¶ added in v0.2.0
func (*Client) ReportsDeviceDnsMismatch ¶ added in v0.2.0
func (*Client) ReportsDevicePoeStatus ¶ added in v0.2.0
func (c *Client) ReportsDevicePoeStatus() ([]DevicePoeStatus, error)
func (*Client) ReportsDevicePortUtilization ¶ added in v0.2.0
func (c *Client) ReportsDevicePortUtilization(req *MarkAsFreeIfDownForRequest) ([]PortUtilization, error)
func (*Client) ReportsNodeMultiIps ¶ added in v0.2.0
func (c *Client) ReportsNodeMultiIps() ([]NodeIPCount, error)
func (*Client) ReportsPortAdminDown ¶ added in v0.2.0
func (c *Client) ReportsPortAdminDown() ([]PortAdminDown, error)
func (*Client) ReportsPortErrorDisabled ¶ added in v0.2.0
func (c *Client) ReportsPortErrorDisabled() ([]PortErrorDisabled, error)
func (*Client) ReportsPortHalfDuplex ¶ added in v0.2.0
func (c *Client) ReportsPortHalfDuplex() ([]PortHalfDuplex, error)
func (*Client) ReportsPortMultiNodes ¶ added in v0.2.0
func (c *Client) ReportsPortMultiNodes(filterByVlan int) ([]PortMultiNodes, error)
func (*Client) ReportsPortVlanMismatch ¶ added in v0.2.0
func (c *Client) ReportsPortVlanMismatch() ([]PortVlanMismatch, error)
func (*Client) SearchDevice ¶
func (c *Client) SearchDevice(query *SearchDeviceQuery) ([]Device, error)
type Device ¶
type Device struct { Log string `json:"log"` Location string `json:"location"` LastMacsuckStamp string `json:"last_macsuck_stamp"` Ps2Type string `json:"ps2_type"` SnmpVer int `json:"snmp_ver"` LastArpnip string `json:"last_arpnip"` Creation string `json:"creation"` SnmpClass string `json:"snmp_class"` Ps1Type string `json:"ps1_type"` Contact string `json:"contact"` SnmpEngineid string `json:"snmp_engineid"` Model string `json:"model"` SinceFirstSeen Float64String `json:"since_first_seen"` SnmpComm string `json:"snmp_comm"` Name string `json:"name"` Slots int `json:"slots"` IP string `json:"ip"` SinceLastMacsuck Float64String `json:"since_last_macsuck"` Os string `json:"os"` LastDiscover string `json:"last_discover"` Layers string `json:"layers"` DNS string `json:"dns"` VtpDomain string `json:"vtp_domain"` UptimeAge string `json:"uptime_age"` Mac string `json:"mac"` LastDiscoverStamp string `json:"last_discover_stamp"` Uptime int64 `json:"uptime"` Description string `json:"description"` ChassisID string `json:"chassis_id"` FirstSeenStamp string `json:"first_seen_stamp"` Fan string `json:"fan"` Ps1Status string `json:"ps1_status"` LastArpnipStamp string `json:"last_arpnip_stamp"` Vendor string `json:"vendor"` LastMacsuck string `json:"last_macsuck"` Ps2Status string `json:"ps2_status"` SinceLastArpnip Float64String `json:"since_last_arpnip"` SinceLastDiscover Float64String `json:"since_last_discover"` OsVer string `json:"os_ver"` NumPorts int `json:"num_ports"` Serial string `json:"serial"` IsPseudo int `json:"is_pseudo"` Alias string `json:"alias"` }
type DeviceDetails ¶ added in v0.2.0
type DeviceDetails struct { Model string `json:"model"` Fan string `json:"fan"` Vendor string `json:"vendor"` Layers string `json:"layers"` Uptime int64 `json:"uptime"` LastDiscover string `json:"last_discover"` Creation string `json:"creation"` OsVer string `json:"os_ver"` Log string `json:"log"` Slots int `json:"slots"` Description string `json:"description"` IP string `json:"ip"` VtpDomain string `json:"vtp_domain"` ChassisID string `json:"chassis_id"` Ps2Type string `json:"ps2_type"` LastMacsuck string `json:"last_macsuck"` SnmpComm string `json:"snmp_comm"` Ps1Status string `json:"ps1_status"` SnmpEngineid string `json:"snmp_engineid"` IsPseudo int `json:"is_pseudo"` Os string `json:"os"` SnmpVer int `json:"snmp_ver"` Name string `json:"name"` Ps2Status string `json:"ps2_status"` DNS string `json:"dns"` Location string `json:"location"` Serial string `json:"serial"` Ps1Type string `json:"ps1_type"` SnmpClass string `json:"snmp_class"` Contact string `json:"contact"` LastArpnip string `json:"last_arpnip"` Mac string `json:"mac"` }
type DevicePoeStatus ¶ added in v0.2.0
type DevicePoeStatus struct { PoeDisabledPorts int `json:"poe_disabled_ports"` PoePowerCommitted string `json:"poe_power_committed"` PoeCapablePorts int `json:"poe_capable_ports"` Name string `json:"name"` Model string `json:"model"` PoePoweredPorts int `json:"poe_powered_ports"` PoePowerDelivering string `json:"poe_power_delivering"` PoeErroredPorts int `json:"poe_errored_ports"` Location string `json:"location"` DNS string `json:"dns"` IP string `json:"ip"` Module int `json:"module"` Power int `json:"power"` Status string `json:"status"` }
type Float64String ¶ added in v0.2.2
type Float64String float64
func (Float64String) MarshalJSON ¶ added in v0.2.2
func (f Float64String) MarshalJSON() ([]byte, error)
func (*Float64String) UnmarshalJSON ¶ added in v0.2.2
func (f *Float64String) UnmarshalJSON(b []byte) error
type MarkAsFreeIfDownForRequest ¶ added in v0.2.0
type NodeIPCount ¶ added in v0.2.0
type PortAdminDown ¶ added in v0.2.0
type PortErrorDisabled ¶ added in v0.2.0
type PortHalfDuplex ¶ added in v0.2.0
type PortMultiNodes ¶ added in v0.2.0
type PortUtilization ¶ added in v0.2.0
type PortVlanMismatch ¶ added in v0.2.0
type SearchDeviceQuery ¶
type SearchDeviceQuery struct { Q string `json:"q" yaml:"q"` Name string `json:"name" yaml:"name"` Location string `json:"location" yaml:"location"` DNS string `json:"dns" yaml:"dns"` Ip string `json:"ip" yaml:"ip"` Description string `json:"description" yaml:"description"` Mac string `json:"mac" yaml:"mac"` Model string `json:"model" yaml:"model"` OS string `json:"os" yaml:"os"` OSVer string `json:"os_ver" yaml:"os_ver"` Vendor string `json:"vendor" yaml:"vendor"` Layers string `json:"layers" yaml:"layers"` Matchall bool `json:"matchall" yaml:"matchall"` SeeAllColumns bool `json:"seeallcolumns" yaml:"seeallcolumns"` // contains filtered or unexported fields }
func (*SearchDeviceQuery) Id ¶
func (q *SearchDeviceQuery) Id() uint64
func (*SearchDeviceQuery) Serialize ¶
func (q *SearchDeviceQuery) Serialize() url.Values
Click to show internal directories.
Click to hide internal directories.