Documentation ¶
Index ¶
- Constants
- func DeleteRepoFromIndexer(repoID int64) error
- func InitIssueIndexer(populateIndexer func() error)
- func InitRepoIndexer(populateIndexer func() error)
- func IssueIndexerBatch() rupture.FlushingBatch
- func RepoIndexerBatch() rupture.FlushingBatch
- func SearchIssuesByKeyword(repoID int64, keyword string) ([]int64, error)
- type IssueIndexerData
- type IssueIndexerUpdate
- type RepoIndexerData
- type RepoIndexerOp
- type RepoIndexerUpdate
- type RepoSearchResult
Constants ¶
const ( // RepoIndexerOpUpdate add/update a file's contents RepoIndexerOpUpdate = iota // RepoIndexerOpDelete delete a file RepoIndexerOpDelete )
Variables ¶
This section is empty.
Functions ¶
func DeleteRepoFromIndexer ¶ added in v1.3.0
DeleteRepoFromIndexer delete all of a repo's files from indexer
func InitIssueIndexer ¶ added in v1.3.0
func InitIssueIndexer(populateIndexer func() error)
InitIssueIndexer initialize issue indexer
func InitRepoIndexer ¶ added in v1.3.0
func InitRepoIndexer(populateIndexer func() error)
InitRepoIndexer initialize repo indexer
func IssueIndexerBatch ¶ added in v1.3.0
func IssueIndexerBatch() rupture.FlushingBatch
IssueIndexerBatch batch to add updates to
func RepoIndexerBatch ¶ added in v1.3.0
func RepoIndexerBatch() rupture.FlushingBatch
RepoIndexerBatch batch to add updates to
Types ¶
type IssueIndexerData ¶ added in v1.3.0
IssueIndexerData data stored in the issue indexer
func (*IssueIndexerData) Type ¶ added in v1.5.0
func (i *IssueIndexerData) Type() string
Type returns the document type, for bleve's mapping.Classifier interface.
type IssueIndexerUpdate ¶ added in v1.3.0
type IssueIndexerUpdate struct { IssueID int64 Data *IssueIndexerData }
IssueIndexerUpdate an update to the issue indexer
func (IssueIndexerUpdate) AddToFlushingBatch ¶ added in v1.5.0
func (i IssueIndexerUpdate) AddToFlushingBatch(batch rupture.FlushingBatch) error
AddToFlushingBatch adds the update to the given flushing batch.
type RepoIndexerData ¶ added in v1.3.0
RepoIndexerData data stored in the repo indexer
func (*RepoIndexerData) Type ¶ added in v1.5.0
func (d *RepoIndexerData) Type() string
Type returns the document type, for bleve's mapping.Classifier interface.
type RepoIndexerOp ¶ added in v1.3.0
type RepoIndexerOp int
RepoIndexerOp type of operation to perform on repo indexer
type RepoIndexerUpdate ¶ added in v1.3.0
type RepoIndexerUpdate struct { Filepath string Op RepoIndexerOp Data *RepoIndexerData }
RepoIndexerUpdate an update to the repo indexer
func (RepoIndexerUpdate) AddToFlushingBatch ¶ added in v1.5.0
func (update RepoIndexerUpdate) AddToFlushingBatch(batch rupture.FlushingBatch) error
AddToFlushingBatch adds the update to the given flushing batch.
type RepoSearchResult ¶ added in v1.3.0
type RepoSearchResult struct { RepoID int64 StartIndex int EndIndex int Filename string Content string }
RepoSearchResult result of performing a search in a repo
func SearchRepoByKeyword ¶ added in v1.3.0
func SearchRepoByKeyword(repoIDs []int64, keyword string, page, pageSize int) (int64, []*RepoSearchResult, error)
SearchRepoByKeyword searches for files in the specified repo. Returns the matching file-paths