proto

package
v0.0.0-...-15897c0 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2023 License: MIT Imports: 6 Imported by: 0

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 net.Conn, timeout time.Duration) 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 net.Conn, timeout time.Duration) 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