Documentation ¶
Index ¶
- Constants
- func DeleteRepoFromIndexer(repoID int64) error
- func InitIssueIndexer(populateIndexer func() error)
- func InitRepoIndexer(populateIndexer func() error)
- func SearchIssuesByKeyword(repoID int64, keyword string) ([]int64, error)
- type Batch
- type IssueIndexerData
- type IssueIndexerUpdate
- type RepoIndexerData
- type RepoIndexerOp
- type RepoIndexerUpdate
- type RepoSearchResult
- type Update
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.1
DeleteRepoFromIndexer delete all of a repo's files from indexer
func InitIssueIndexer ¶ added in v1.3.1
func InitIssueIndexer(populateIndexer func() error)
InitIssueIndexer initialize issue indexer
func InitRepoIndexer ¶ added in v1.3.1
func InitRepoIndexer(populateIndexer func() error)
InitRepoIndexer initialize repo indexer
Types ¶
type Batch ¶ added in v1.3.1
type Batch struct {
// contains filtered or unexported fields
}
Batch batch of indexer updates that automatically flushes once it reaches a certain size
func IssueIndexerBatch ¶ added in v1.3.1
func IssueIndexerBatch() *Batch
IssueIndexerBatch batch to add updates to
func RepoIndexerBatch ¶ added in v1.3.1
func RepoIndexerBatch() *Batch
RepoIndexerBatch batch to add updates to
type IssueIndexerData ¶ added in v1.3.1
IssueIndexerData data stored in the issue indexer
type IssueIndexerUpdate ¶ added in v1.3.1
type IssueIndexerUpdate struct { IssueID int64 Data *IssueIndexerData }
IssueIndexerUpdate an update to the issue indexer
type RepoIndexerData ¶ added in v1.3.1
RepoIndexerData data stored in the repo indexer
type RepoIndexerOp ¶ added in v1.3.1
type RepoIndexerOp int
RepoIndexerOp type of operation to perform on repo indexer
type RepoIndexerUpdate ¶ added in v1.3.1
type RepoIndexerUpdate struct { Filepath string Op RepoIndexerOp Data *RepoIndexerData }
RepoIndexerUpdate an update to the repo indexer
type RepoSearchResult ¶ added in v1.3.1
RepoSearchResult result of performing a search in a repo
func SearchRepoByKeyword ¶ added in v1.3.1
func SearchRepoByKeyword(repoID int64, keyword string, page, pageSize int) (int64, []*RepoSearchResult, error)
SearchRepoByKeyword searches for files in the specified repo. Returns the matching file-paths