result

package
v0.2.37 Latest Latest
Warning

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

Go to latest
Published: May 15, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Content managed by Project Forge, see [projectforge.md] for details.

Content managed by Project Forge, see [projectforge.md] for details.

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

nolint

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, obj any, q string) *Result

type Results

type Results []*Result

func (Results) Sort

func (rs Results) Sort()

Jump to

Keyboard shortcuts

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