code

package
v1.21.9 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2024 License: MIT Imports: 23 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init()

Init initialize the repo indexer

func IsAvailable added in v1.17.0

func IsAvailable(ctx context.Context) bool

IsAvailable checks if issue indexer is available

func UpdateRepoIndexer

func UpdateRepoIndexer(repo *repo_model.Repository)

UpdateRepoIndexer update a repository's entries in the indexer

Types

type Result

type Result struct {
	RepoID      int64
	Filename    string
	CommitID    string
	UpdatedUnix timeutil.TimeStamp
	Language    string
	Color       string
	Lines       []ResultLine
}

Result a search result to display

func PerformSearch

func PerformSearch(ctx context.Context, repoIDs []int64, language, keyword string, page, pageSize int, isMatch bool) (int, []*Result, []*internal.SearchResultLanguages, error)

PerformSearch perform a search on a repository

type ResultLine added in v1.21.8

type ResultLine struct {
	Num              int
	FormattedContent template.HTML
}

type SearchResultLanguages added in v1.12.0

type SearchResultLanguages = internal.SearchResultLanguages

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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