result

package
v0.4.37 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 23, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Match

type Match struct {
	Key   string `json:"k"`
	Value string `json:"v"`
}

func (*Match) ValueSplit

func (m *Match) ValueSplit(q string) []string

type Matches

type Matches []*Match

func MatchesFor

func MatchesFor(key string, x any, q string) Matches

func (Matches) Sort

func (m Matches) Sort()

type Result

type Result struct {
	Type    string  `json:"type,omitempty"`
	ID      string  `json:"id,omitempty"`
	Title   string  `json:"title,omitempty"`
	Icon    string  `json:"icon,omitempty"`
	URL     string  `json:"url,omitempty"`
	Matches Matches `json:"matches,omitempty"`
	Data    any     `json:"data,omitempty"`
	HTML    string  `json:"-"`
}

func NewResult

func NewResult(t string, id string, url string, title string, icon string, diff any, data any, q string) *Result

type Results

type Results []*Result

func (Results) Sort

func (rs Results) Sort() Results

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL