codesearch

package
v1.16.1-alpha Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CodeSearch

type CodeSearch struct {
	Host   string // zoekt-webserver host. example: https://zoekt.example.com
	Client *http.Client
}

func (*CodeSearch) GetClient

func (s *CodeSearch) GetClient() *http.Client

func (*CodeSearch) RepoCount

func (s *CodeSearch) RepoCount(ctx context.Context) (int, error)

RepoCount returns the total number of repositories in the zoekt index.

func (*CodeSearch) Search

func (s *CodeSearch) Search(ctx context.Context, queryStr string, page pagination.Page) (*SearchResults, error)

Search queries zoekt server for FileNameMatch or ChunkMatch. It returns *RepoOnlyError when the query only filters by repo name (optionally with `lang:` filter.)

type RepoOnlyError

type RepoOnlyError struct{ Query string }

func (*RepoOnlyError) Error

func (e *RepoOnlyError) Error() string

type SearchResults

type SearchResults struct {
	Results []models.Result
	HasMore bool
	Stats   zoekt.Stats // zoekt search stats (MatchCount, FileCount, Duration, …)
}

SearchResults is a single page of content-search results plus whether more pages follow.

Source Files

  • codesearch.go

Jump to

Keyboard shortcuts

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