search

package
v0.0.0-...-4cc3681 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2024 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidTerm      = errors.New("given term is invalid")
	ErrUnreachable      = errors.New("server unreachable")
	ErrWrongContentType = errors.New("wrong content type")
	ErrParsing          = errors.New("parsing error")
)

Functions

This section is empty.

Types

type Item

type Item struct {
	ID          string `json:"id"`
	Name        string `json:"name"`
	ShortName   string `json:"shortName"`
	Description string `json:"description"`
	Kind        string `json:"kind"`
}

type Options

type Options struct {
	Fuzzy bool
	Limit int
}

type Query

type Query struct {
	Query string
}

type Result

type Result struct {
	Count int64  `json:"count"`
	Data  []Item `json:"data"`
}
func Search(ctx context.Context, query *Query, opts *Options) (*Result, error)

type StatusResponse

type StatusResponse struct {
	Message string `json:"message"`
	Code    int    `json:"code"`
}

func (StatusResponse) Error

func (e StatusResponse) Error() string

Jump to

Keyboard shortcuts

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