Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repo ¶
type Repo struct { RepoID uint64 `json:"repoID"` LocalPath string `json:"localPath,omitempty"` RemoteURL string `json:"remoteURL,omitempty"` NumDocumentsInRepo int `json:"numDocumentsInRepo"` NumLinesInRepo int `json:"numLinesInRepo"` NumSectionsInRepo int `json:"numSectionsInRepo"` Documents []Document `json:"documents,omitempty"` }
type ResponseBase ¶
type ResponseBase struct { // Code == 0 代表无错误,否则返回 Message 错误信息 Code int `json:"code"` // 错误信息 Message string `json:"message"` }
Web 服务 API 基础字段
type SearchResponse ¶
type SearchResponse struct { ResponseBase Repos []Repo `json:"repos,omitempty"` Languages []Language `json:"languages,omitempty"` NumRepos int `json:"numRepos"` NumDocuments int `json:"numDocuments"` NumLines int `json:"numLines"` NumSections int `json:"numSections"` NumRegexMatches int `json:"numRegexMatches"` SearchDurationInMicroSeconds int64 `json:"searchDurationInMicroSeconds"` RecallDurationInMicroSeconds int64 `json:"recallDurationInMicroSeconds"` Responsetype string `json:"responseType"` }
搜索返回结果,按照下面的层级结构来组织
仓库(repos) -> 文档(documents) -> 行(lines) -> 片段(sections)
不属于一个仓库的文档也会被组织到一个空仓库(RepoID == 0)里方便展示 “片段”指的是一个匹配的字符串,是搜索匹配的最小单元
Click to show internal directories.
Click to hide internal directories.