Back to godoc.org

Package query

v0.0.0-...-c738852
Latest Go to latest

The highest tagged major version is .

Published: Oct 4, 2020 | License: GPL3 | Module: github.com/MichaelMure/git-bug

Index

type Filters

type Filters struct {
	Status      []bug.Status
	Author      []string
	Actor       []string
	Participant []string
	Label       []string
	Title       []string
	NoLabel     bool
}

Filters is a collection of Filter that implement a complex filter

type OrderBy

type OrderBy int
const (
	OrderById OrderBy
	OrderByCreation
	OrderByEdit
)

type OrderDirection

type OrderDirection int
const (
	OrderAscending OrderDirection
	OrderDescending
)

type Query

type Query struct {
	Filters
	OrderBy
	OrderDirection
}

Query is the intermediary representation of a Bug's query. It is either produced by parsing a query string (ex: "status:open author:rene") or created manually. This query doesn't do anything by itself and need to be interpreted for the specific domain of application.

func NewQuery

func NewQuery() *Query

NewQuery return an identity query with the default sorting (creation-desc).

func Parse

func Parse(query string) (*Query, error)

Parse parse a query DSL

Ex: "status:open author:descartes sort:edit-asc"

Supported filter qualifiers and syntax are described in docs/queries.md

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier