query

package
v1.1.60-test Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2026 License: MIT Imports: 1 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Query

type Query struct {
	Kind    base.Kind     `json:"kind,omitempty"`
	Context *QueryContext `json:"context,omitempty"`
	Fetch   QueryFetch    `json:"fetch,omitempty"`
	Spec    *Spec         `json:"spec,omitempty"`
}

type QueryContext

type QueryContext map[string]any

type QueryFetch

type QueryFetch string
const (
	QueryFetchLinks QueryFetch = "links"
	QueryFetchItems QueryFetch = "items"
)

type QueryResult

type QueryResult struct {
	Kind     QueryResultKind `json:"kind,omitempty"`
	ItemKind base.Kind       `json:"itemKind,omitempty"`
	Items    []any           `json:"items"`
	Links    []base.Link     `json:"links"`
	Query    Query           `json:"query,omitempty"`
}

type QueryResultKind

type QueryResultKind string
const (
	QueryResultKindQueryresult QueryResultKind = "queryresult"
)

type Spec

type Spec struct {
	Match SpecMatch `json:"match,omitempty"`
	Terms []Term    `json:"terms,omitempty"`
	Sort  *SpecSort `json:"sort,omitempty"`
}

type SpecMatch

type SpecMatch string
const (
	SpecMatchAll  SpecMatch = "all"
	SpecMatchAny  SpecMatch = "any"
	SpecMatchNone SpecMatch = "none"
)

type SpecSort

type SpecSort struct {
	By    string        `json:"by"`
	Order SpecSortOrder `json:"order,omitempty"`
}

type SpecSortOrder

type SpecSortOrder string
const (
	SpecSortOrderAsc  SpecSortOrder = "asc"
	SpecSortOrderDesc SpecSortOrder = "desc"
)

type Term

type Term struct {
	Op       TermOp `json:"op,omitempty"`
	Property string `json:"property,omitempty"`
	Rel      string `json:"rel,omitempty"`
	Tag      string `json:"tag,omitempty"`
	Value    any    `json:"value,omitempty"`
}

type TermOp

type TermOp string
const (
	TermOpEq        TermOp = "="
	TermOpGt        TermOp = ">"
	TermOpGte       TermOp = ">="
	TermOpLt        TermOp = "<"
	TermOpLte       TermOp = "<="
	TermOpNe        TermOp = "!="
	TermOpMatch     TermOp = "~"
	TermOpRegex     TermOp = "=~"
	TermOpExists    TermOp = "exists"
	TermOpNotExists TermOp = "!exists"
	TermOpContains  TermOp = "contains"
)

Jump to

Keyboard shortcuts

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