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) SearchDevice(query *SearchDeviceQuery) ([]Device, error)
- func (c *Client) UnmarshalResponse(resp *http.Response, value interface{}, validResponseCode ...int) error
- type Device
- 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 (*Client) DoWithRetry ¶
func (*Client) NewRequest ¶
func (*Client) SearchDevice ¶
func (c *Client) SearchDevice(query *SearchDeviceQuery) ([]Device, error)
type Device ¶
type Device struct {
UptimeAge string `json:"uptime_age"`
Location string `json:"location"`
SinceLastArpnip float64 `json:"since_last_arpnip"`
FirstSeenStamp string `json:"first_seen_stamp"`
OsVer string `json:"os_ver"`
Name string `json:"name"`
LastArpnipStamp string `json:"last_arpnip_stamp"`
Model string `json:"model"`
SinceFirstSeen float64 `json:"since_first_seen"`
IP string `json:"ip"`
Serial string `json:"serial"`
SinceLastMacsuck float64 `json:"since_last_macsuck"`
DNS string `json:"dns"`
SinceLastDiscover float64 `json:"since_last_discover"`
LastMacsuckStamp string `json:"last_macsuck_stamp"`
LastDiscoverStamp string `json:"last_discover_stamp"`
}
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"`
// 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.