Documentation
¶
Index ¶
- Constants
- type Engine
- type EngineAttribute
- type EngineInterface
- type EngineResult
- type EngineResultInterface
- type JsonManager
- func (jm *JsonManager) Get(q QueryInterface, confirm bool) (string, []string, []string, error)
- func (jm *JsonManager) GetCandidateKeys(q QueryInterface) []string
- func (jm *JsonManager) GetFilteredData(q QueryInterface, confirm bool) (*simplejson.Json, []string, []string, error)
- func (jm *JsonManager) GetPretty(q QueryInterface, confirm bool) (string, []string, []string, error)
- type Query
- func (q *Query) Add(query []rune) []rune
- func (q *Query) Clear() []rune
- func (q *Query) Delete(i int) []rune
- func (q *Query) Get() []rune
- func (q *Query) GetChar(idx int) rune
- func (q *Query) GetKeywords() [][]rune
- func (q *Query) GetLastKeyword() []rune
- func (q *Query) IndexOffset(i int) int
- func (q *Query) Insert(query []rune, idx int) []rune
- func (q *Query) Length() int
- func (q *Query) PopKeyword() ([]rune, []rune)
- func (q *Query) Set(query []rune) []rune
- func (q *Query) StringAdd(query string) string
- func (q *Query) StringGet() string
- func (q *Query) StringGetKeywords() []string
- func (q *Query) StringGetLastKeyword() string
- func (q *Query) StringInsert(query string, idx int) string
- func (q *Query) StringPopKeyword() (string, []rune)
- func (q *Query) StringSet(query string) string
- type QueryInterface
- type Suggestion
- type SuggestionDataType
- type SuggestionInterface
- type Terminal
- type TerminalDrawAttributes
Constants ¶
View Source
const ( DefaultY int = 1 FilterPrompt string = "[Filter]> " )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
func (*Engine) GetQuery ¶
func (e *Engine) GetQuery() QueryInterface
func (*Engine) Run ¶
func (e *Engine) Run() EngineResultInterface
type EngineAttribute ¶
type EngineInterface ¶
type EngineInterface interface {
Run() EngineResultInterface
GetQuery() QueryInterface
}
func NewEngine ¶
func NewEngine(s io.Reader, ea *EngineAttribute) (EngineInterface, error)
type EngineResult ¶
type EngineResult struct {
// contains filtered or unexported fields
}
func (*EngineResult) GetContent ¶
func (er *EngineResult) GetContent() string
func (*EngineResult) GetError ¶
func (er *EngineResult) GetError() error
func (*EngineResult) GetQueryString ¶
func (er *EngineResult) GetQueryString() string
type EngineResultInterface ¶
type JsonManager ¶
type JsonManager struct {
// contains filtered or unexported fields
}
func NewJsonManager ¶
func NewJsonManager(reader io.Reader) (*JsonManager, error)
func (*JsonManager) Get ¶
func (jm *JsonManager) Get(q QueryInterface, confirm bool) (string, []string, []string, error)
func (*JsonManager) GetCandidateKeys ¶
func (jm *JsonManager) GetCandidateKeys(q QueryInterface) []string
func (*JsonManager) GetFilteredData ¶
func (jm *JsonManager) GetFilteredData(q QueryInterface, confirm bool) (*simplejson.Json, []string, []string, error)
func (*JsonManager) GetPretty ¶
func (jm *JsonManager) GetPretty(q QueryInterface, confirm bool) (string, []string, []string, error)
type Query ¶
type Query struct {
// contains filtered or unexported fields
}
func NewQueryWithString ¶
func (*Query) GetKeywords ¶
func (*Query) GetLastKeyword ¶
func (*Query) IndexOffset ¶
func (*Query) PopKeyword ¶
func (*Query) StringGetKeywords ¶
func (*Query) StringGetLastKeyword ¶
func (*Query) StringPopKeyword ¶
type QueryInterface ¶
type QueryInterface interface {
Get() []rune
Set(query []rune) []rune
Insert(query []rune, idx int) []rune
Add(query []rune) []rune
Delete(i int) []rune
Clear() []rune
Length() int
IndexOffset(int) int
GetChar(int) rune
GetKeywords() [][]rune
GetLastKeyword() []rune
PopKeyword() ([]rune, []rune)
StringGet() string
StringSet(query string) string
StringInsert(query string, idx int) string
StringAdd(query string) string
StringGetKeywords() []string
StringGetLastKeyword() string
StringPopKeyword() (string, []rune)
}
type Suggestion ¶
type Suggestion struct {
}
func NewSuggestion ¶
func NewSuggestion() *Suggestion
func (*Suggestion) Get ¶
func (s *Suggestion) Get(json *simplejson.Json, keyword string) []string
func (*Suggestion) GetCandidateKeys ¶
func (s *Suggestion) GetCandidateKeys(json *simplejson.Json, keyword string) []string
func (*Suggestion) GetCurrentType ¶
func (s *Suggestion) GetCurrentType(json *simplejson.Json) SuggestionDataType
type SuggestionDataType ¶
type SuggestionDataType int
const ( UNKNOWN SuggestionDataType = iota ARRAY MAP NUMBER STRING BOOL )
type SuggestionInterface ¶
type SuggestionInterface interface {
Get(json *simplejson.Json, keyword string) []string
GetCandidateKeys(json *simplejson.Json, keyword string) []string
}
Click to show internal directories.
Click to hide internal directories.

