Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseOutputAttrs ¶
ParseOutputAttrs validates attributes string and formats it for Get and List calls
Types ¶
type OutputAttrParser ¶
type OutputAttrParser struct {
// contains filtered or unexported fields
}
OutputAttrParser represents a parser of get and list attribute strings
func NewOutputAttrParser ¶
func NewOutputAttrParser(buf *bytes.Buffer) *OutputAttrParser
NewOutputAttrParser returns a new instance of OutputAttrParser
func (*OutputAttrParser) Parse ¶
func (oap *OutputAttrParser) Parse(attrMap map[string]string) (*OutputAttrStr, error)
Parse is the entry point for the parser
type OutputAttrScanner ¶
type OutputAttrScanner struct {
// contains filtered or unexported fields
}
OutputAttrScanner represents a lexical scanner for get and list attribute strings
func NewOutputAttrScanner ¶
func NewOutputAttrScanner(buf *bytes.Buffer) *OutputAttrScanner
NewOutputAttrScanner returns a new instance of OutputAttrScanner
func (*OutputAttrScanner) Scan ¶
func (oas *OutputAttrScanner) Scan() (Token, string)
Scan returns the next token and literal value from OutputAttrScanner
type OutputAttrStr ¶
type OutputAttrStr struct {
Fields []string
}
OutputAttrStr is a struct to hold list of output attribute string parts
type QueryParser ¶
type QueryParser struct {
// contains filtered or unexported fields
}
QueryParser represents a parser of query strings
func NewQueryParser ¶
func NewQueryParser(buf *bytes.Buffer) *QueryParser
NewQueryParser returns a new instance of QueryParser
type QueryScanner ¶
type QueryScanner struct {
// contains filtered or unexported fields
}
QueryScanner represents a lexical scanner for query strings
func NewQueryScanner ¶
func NewQueryScanner(buf *bytes.Buffer) *QueryScanner
NewQueryScanner returns a new instance of QueryScanner
func (*QueryScanner) Scan ¶
func (qs *QueryScanner) Scan() (Token, string)
Scan returns the next token and literal value from QueryScanner
type QueryStr ¶
type QueryStr struct {
Parts []string
}
QueryStr is a struct to hold list of query string parts
type Scanner ¶
type Scanner struct {
// contains filtered or unexported fields
}
Scanner represents a lexical scanner
type Token ¶
type Token int
Token represents a lexical token.
const ( // ILLEGAL is an illegal character ILLEGAL Token = iota // EOS is end of string EOS // WS is whitespace WS //IDENT is field name IDENT // ASTERISK IS * ASTERISK // BSLASH is \ BSLASH // CLOSEBRACK is ) CLOSEBRACK // CLOSESQBRACK is ] CLOSESQBRACK // COLON is : COLON // COMMA is , COMMA // EQUALS is = EQUALS // FSLASH is / FSLASH // GT is > GT // LT is < LT // OP is an operator OP // OPENBRACK is ( OPENBRACK // OPENSQBRACK is [ OPENSQBRACK // SINGLEQUOTE is ' SINGLEQUOTE // TILDE is ~ TILDE // UNDERSCORE is _ UNDERSCORE // VALUE is query or input attribute value VALUE )