Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LookupFunc ¶
LookupFunc looks up a query string. It should return the corresponding URLs for the given string. It is not considered an error if the function returns an empty slice. The function should return an error if the query should fail.
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
Parser represents a query parser.
type Query ¶
type Query struct {
// contains filtered or unexported fields
}
Query represents a query.
func New ¶
func New(query string, lookup LookupFunc) (*Query, error)
New create a new query object from a query.
func (Query) Execute ¶
Execute executes the query on the given index and returns the slice of the matched IndexEntries.
func (Query) ExecuteFunc ¶
ExecuteFunc executes the query on an index. The callback function is called for every matched IndexEntry.
Click to show internal directories.
Click to hide internal directories.