Documentation
¶
Overview ¶
Package mikrotik contains specific for RouterOS structs and functions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DNSStaticEntries ¶
type DNSStaticEntries []DNSStaticEntry
DNSStaticEntries is static DNS entries set.
func (DNSStaticEntries) Render ¶
func (se DNSStaticEntries) Render(to io.Writer, opts ...RenderingOptions) (int, error)
Render mikrotik static dns entry and write it into some writer. Returned values is count of wrote bytes and error, if something goes wrong.
type DNSStaticEntry ¶
type DNSStaticEntry struct { Address string // IP address (net.IP is not used for allocation avoiding reasons (to string), eg.: 0.0.0.0) Comment string // Short description of the item (eg.: Any text) Disabled bool // Defines whether item is ignored or used (eg.: yes,no) Name string // Host name (eg.: www.example.com) Regexp string // Regular expression (eg.: .*\\.example\\.com) TTL string // Time To Live (eg.: 1d) }
DNSStaticEntry is static DNS entry for RouterOS usage.
type Error ¶
type Error uint8
Error is a special type for package-specific errors.
const ErrEmptyFields Error = 1
ErrEmptyFields means required fields does not filled.
type RenderingOptions ¶
type RenderingOptions struct {
Prefix, Postfix string
}
RenderingOptions describes options for rendering.
Click to show internal directories.
Click to hide internal directories.