Documentation ¶
Index ¶
- Constants
- Variables
- func AcceptibleSearchError(err error) bool
- func GetSearchProgram(ctx context.Context, initialQuery string, dataProvider search.DataProvider, ...) (*tea.Program, error)
- func OpenItem(item list.Item) error
- func ResultToItems(result *search.SearchResult, query string, mapItem ItemMapping) []list.Item
- type ItemMapping
- type ListItem
Constants ¶
View Source
const UNTITLED = "<UNTITLED>"
Variables ¶
Functions ¶
func AcceptibleSearchError ¶
func GetSearchProgram ¶
func GetSearchProgram( ctx context.Context, initialQuery string, dataProvider search.DataProvider, searchProvider search.SearchProvider, mapItem *func(x ListItem) list.Item, ) (*tea.Program, error)
@todo Rather than taking providers this should probably take a search function that can handle customized querying. I.e. if I want to return only full-text documents with this current setup i would need to create a new SearchProvider that returns full-text docs for the SearchUrls call
func OpenItem ¶
@todo Support other systems that don't have `open` @todo should prob store a list of the `item` structs that have the URL rather than doing this string manipulation
func ResultToItems ¶
func ResultToItems(result *search.SearchResult, query string, mapItem ItemMapping) []list.Item
Types ¶
type ItemMapping ¶
type ListItem ¶
type ListItem struct { // @note ItemTitle is thus named so as not to conflict with the Title() method, which is used by bubbletea ItemTitle, Desc string Body *string Date *time.Time // contains filtered or unexported fields }
func (ListItem) Description ¶
func (ListItem) FilterValue ¶
Click to show internal directories.
Click to hide internal directories.