Versions in this module Expand all Collapse all v1 v1.0.1 Mar 14, 2024 v1.0.0 Mar 14, 2024 Changes in this version + var ErrWrongReqSyntax = errors.New("illegal syntax in request") + var ErrWrongResSyntax = errors.New("illegal syntax in response") + func NewParser(vdfile *vdfile.VDFile) (protocol.Protocol, error) + type CommandPattern struct + type Item struct + func ItemsFromConfig(input string) []Item + func (i Item) String() string + func (i Item) Type() ItemType + func (i Item) Value() string + type ItemType int + const ItemCommand + const ItemEOF + const ItemError + const ItemEscape + const ItemIllegal + const ItemLeftMeta + const ItemNumber + const ItemNumberValuePlaceholder + const ItemParam + const ItemRightMeta + const ItemStringValuePlaceholder + const ItemWhiteSpace + func (i ItemType) String() string + type Lexer struct + Input string + ItemsCh chan Item + State StateFn + func NewConfig(input string) *Lexer + func NewData(input string) *Lexer + func (l *Lexer) Items() []Item + func (l *Lexer) NextItem() Item + type Parser struct + func (p *Parser) Decode(data []byte) ([]protocol.Transaction, error) + func (p *Parser) Encode(txs []protocol.Transaction) ([]byte, error) + func (p *Parser) Trigger(cmdName string) protocol.Transaction + type StateFn func(*Lexer) StateFn