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) error
- func (c *Client) ConnectNew(user string, password string) error
- func (c *Client) Dial() error
- func (c *Client) Query(command string, q Query) (Reply, error)
- func (c *Client) Receive() (reply Reply, err error)
- func (c *Client) WriteWord(word string) error
- type Pair
- type Query
- type Reply
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct { Timeout time.Duration TLSConfig *tls.Config // contains filtered or unexported fields }
Client is a RouterOS API client.
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.