search

package
v0.0.0-...-df3f4e6 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2023 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Overview

Package search provides tools to query varda resources.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Query

type Query struct {
	// Expr specifies the query selection.
	Expr string

	// Sort specifies how the results should be sorted
	Sort SortKind
}

type Queryer

type Queryer interface {
	Query(ctx context.Context, query Query) (*Result, error)
}

type Result

type Result struct {
	Refs []varda.Ref
}

type Searcher

type Searcher interface {
	Search(ctx context.Context, query Query, f func(ref varda.Ref) error) error
}

type SortKind

type SortKind uint8

SortKind describes how the results of a query should be sorted.

const (
	UnspecifiedSort SortKind = iota
	Unsorted
	ByTimeDesc
	ByTimeAsc
	ByRefDesc
	ByRefAsc
)

func (SortKind) String

func (sk SortKind) String() string

Jump to

Keyboard shortcuts

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