Documentation
¶
Index ¶
- func FilenameIndexerID(repoID int64, filename string) string
- func FilenameMatchIndexPos(content string) (int, int)
- func FilenameOfIndexerID(indexerID string) string
- func ParseIndexerID(indexerID string) (int64, string)
- type FileUpdate
- type Indexer
- type IndexerData
- type RepoChanges
- type SearchOptions
- type SearchResult
- type SearchResultLanguages
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FilenameIndexerID ¶
func FilenameMatchIndexPos ¶ added in v1.23.0
FilenameMatchIndexPos returns the boundaries of its first seven lines.
func FilenameOfIndexerID ¶
func ParseIndexerID ¶
Types ¶
type Indexer ¶
type Indexer interface {
internal.Indexer
Index(ctx context.Context, repo *repo_model.Repository, sha string, changes *RepoChanges) error
Delete(ctx context.Context, repoID int64) error
Search(ctx context.Context, opts *SearchOptions) (int64, []*SearchResult, []*SearchResultLanguages, error)
SupportedSearchModes() []indexer.SearchMode
}
Indexer defines an interface to index and search code contents
type IndexerData ¶
type IndexerData struct {
RepoID int64
}
IndexerData represents data stored in the code indexer
type RepoChanges ¶
type RepoChanges struct {
Updates []FileUpdate
RemovedFilenames []string
}
RepoChanges changes (file additions/updates/removals) to a repo
type SearchOptions ¶ added in v1.22.0
type SearchResult ¶
type SearchResult struct {
RepoID int64
StartIndex int
EndIndex int
Filename string
Content string
CommitID string
UpdatedUnix timeutil.TimeStamp
Language string
Color string
}
SearchResult result of performing a search in a repo
type SearchResultLanguages ¶
SearchResultLanguages result of top languages count in search results
Click to show internal directories.
Click to hide internal directories.