Documentation ¶
Overview ¶
Package routeros provides a programmatic interface to the Mikrotik RouterOS API
Index ¶
- func GetPairVal(pairs []Pair, key string) (string, error)
- type Client
- func (c *Client) Call(command string, params []Pair) (Reply, error)
- func (c *Client) Close()
- func (c *Client) Connect(user string, password string, timeout time.Duration) error
- func (c *Client) ConnectLegacy(user string, password string, timeout time.Duration) error
- func (c *Client) Query(command string, q Query) (Reply, error)
- type Pair
- type Query
- type Reply
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
Client is a RouterOS API client.
func (*Client) ConnectLegacy ¶
type Pair ¶
type Pair struct { Key string Value string // Op is used for Query words to signify logical operations // valid operators are -, =, <, > // see http://wiki.mikrotik.com/wiki/Manual:API#Queries for details. Op string }
Pair is a Key-Value pair for RouterOS Attribute, Query, and Reply words use slices of pairs instead of map because we care about order
Click to show internal directories.
Click to hide internal directories.