proto

package
v0.0.0-...-2a44d57 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 23, 2021 License: MIT Imports: 5 Imported by: 11

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pair

type Pair struct {
	Key, Value string
}

type Reader

type Reader interface {
	ReadSentence() (*Sentence, error)
}

Reader reads sentences from a RouterOS device.

func NewReader

func NewReader(r io.Reader) Reader

NewReader returns a new Reader to read from r.

type Sentence

type Sentence struct {
	// Word that begins with !
	Word string
	Tag  string
	List []Pair
	Map  map[string]string
}

Sentence is a line read from a RouterOS device.

func NewSentence

func NewSentence() *Sentence

func (*Sentence) String

func (sen *Sentence) String() string

type Writer

type Writer interface {
	BeginSentence()
	WriteWord(word string)
	EndSentence() error
}

Writer writes words to a RouterOS device.

func NewWriter

func NewWriter(w io.Writer) Writer

NewWriter returns a new Writer to write to w.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL