keywordsearch

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

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

Go to latest
Published: Jul 29, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

WireSet provides a wire set for this package.

Functions

This section is empty.

Types

type Config

type Config struct {
	EventReaderName string
	Concurrency     int
	MaxRetries      int
}

func (*Config) Prepare

func (c *Config) Prepare() error

type Indexer

type Indexer interface {
	Index(ctx context.Context, repo *types.Repository) error
}

func ProvideIndexer

func ProvideIndexer(l *LocalIndexSearcher) Indexer

type LocalIndexSearcher

type LocalIndexSearcher struct {
}

func NewLocalIndexSearcher

func NewLocalIndexSearcher() *LocalIndexSearcher

func ProvideLocalIndexSearcher

func ProvideLocalIndexSearcher() *LocalIndexSearcher

func (*LocalIndexSearcher) Index

func (*LocalIndexSearcher) Search

func (s *LocalIndexSearcher) Search(
	_ context.Context,
	_ []int64,
	_ string,
	_ bool,
	_ int,
) (types.SearchResult, error)

type Searcher

type Searcher interface {
	Search(ctx context.Context, repoIDs []int64, query string, enableRegex bool, maxResultCount int) (
		types.SearchResult, error)
}

func ProvideSearcher

func ProvideSearcher(l *LocalIndexSearcher) Searcher

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service is responsible for indexing of repository for keyword search.

func NewService

func NewService(
	ctx context.Context,
	config Config,
	gitReaderFactory *events.ReaderFactory[*gitevents.Reader],
	repoReaderFactory *events.ReaderFactory[*repoevents.Reader],
	repoStore store.RepoStore,
	indexer Indexer,
) (*Service, error)

func ProvideService

func ProvideService(ctx context.Context,
	config Config,
	gitReaderFactory *events.ReaderFactory[*gitevents.Reader],
	repoReaderFactory *events.ReaderFactory[*repoevents.Reader],
	repoStore store.RepoStore,
	indexer Indexer,
) (*Service, error)

Jump to

Keyboard shortcuts

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