result

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

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

Package result - 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

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