Documentation
¶
Index ¶
- Constants
- Variables
- func New() func() (pogoPlugin.IPogoPlugin, error)
- func ParseGitIgnore(path string) (*ignore.GitIgnore, error)
- type BasicSearch
- func (g *BasicSearch) Close()
- func (g *BasicSearch) Execute(encodedReq string) string
- func (g *BasicSearch) GetAllStatuses() []ProjectStatus
- func (g *BasicSearch) GetFiles(projectRoot string) (*IndexedProject, error)
- func (g *BasicSearch) GetStatus(projectRoot string) *ProjectStatus
- func (g *BasicSearch) Index(req *pogoPlugin.IProcessProjectReq)
- func (g *BasicSearch) Info() *pogoPlugin.PluginInfoRes
- func (g *BasicSearch) Load(projectRoot string) (*IndexedProject, error)
- func (g *BasicSearch) ProcessProject(req *pogoPlugin.IProcessProjectReq) error
- func (g *BasicSearch) ReIndex(path string)
- func (g *BasicSearch) ReIndexFile(path string, op fsnotify.Op)
- func (g *BasicSearch) Search(projectRoot string, data string, duration string) (*SearchResults, error)
- type ErrorResponse
- type IndexedProject
- type IndexingStatus
- type PogoChunkMatch
- type PogoFileMatch
- type ProjectStatus
- type ProjectUpdater
- type SearchRequest
- type SearchResponse
- type SearchResults
Constants ¶
View Source
const UseWatchers = true
Variables ¶
View Source
var SearchService = createBasicSearch()
Functions ¶
func New ¶
func New() func() (pogoPlugin.IPogoPlugin, error)
func ParseGitIgnore ¶
Even if this function encounters an error, it will always at least return a GitIgnore that matches nothing.
Types ¶
type BasicSearch ¶
type BasicSearch struct {
// contains filtered or unexported fields
}
func (*BasicSearch) Close ¶
func (g *BasicSearch) Close()
func (*BasicSearch) Execute ¶
func (g *BasicSearch) Execute(encodedReq string) string
Executes a command sent to this plugin.
func (*BasicSearch) GetAllStatuses ¶
func (g *BasicSearch) GetAllStatuses() []ProjectStatus
func (*BasicSearch) GetFiles ¶
func (g *BasicSearch) GetFiles(projectRoot string) (*IndexedProject, error)
func (*BasicSearch) GetStatus ¶
func (g *BasicSearch) GetStatus(projectRoot string) *ProjectStatus
func (*BasicSearch) Index ¶
func (g *BasicSearch) Index(req *pogoPlugin.IProcessProjectReq)
func (*BasicSearch) Info ¶
func (g *BasicSearch) Info() *pogoPlugin.PluginInfoRes
func (*BasicSearch) Load ¶
func (g *BasicSearch) Load(projectRoot string) (*IndexedProject, error)
func (*BasicSearch) ProcessProject ¶
func (g *BasicSearch) ProcessProject(req *pogoPlugin.IProcessProjectReq) error
func (*BasicSearch) ReIndex ¶
func (g *BasicSearch) ReIndex(path string)
func (*BasicSearch) ReIndexFile ¶
func (g *BasicSearch) ReIndexFile(path string, op fsnotify.Op)
ReIndexFile handles a single-file event without walking the directory tree. This avoids a full directory re-walk when only one file changed.
func (*BasicSearch) Search ¶
func (g *BasicSearch) Search(projectRoot string, data string, duration string) (*SearchResults, error)
type ErrorResponse ¶
type IndexedProject ¶
type IndexedProject struct {
Root string `json:"root"`
Paths []string `json:"paths"`
FileHashes map[string]string `json:"file_hashes,omitempty"`
Status IndexingStatus `json:"indexing_status"`
}
type IndexingStatus ¶
type IndexingStatus string
IndexingStatus represents the state of a project's search index.
const ( StatusUnindexed IndexingStatus = "unindexed" StatusIndexing IndexingStatus = "indexing" StatusReady IndexingStatus = "ready" StatusStale IndexingStatus = "stale" )
type PogoChunkMatch ¶
type PogoFileMatch ¶
type PogoFileMatch struct {
Path string `json:"path"`
Matches []PogoChunkMatch `json:"matches"`
}
type ProjectStatus ¶
type ProjectStatus struct {
Root string `json:"root"`
Status IndexingStatus `json:"indexing_status"`
FileCount int `json:"file_count"`
}
type ProjectUpdater ¶
type ProjectUpdater struct {
// contains filtered or unexported fields
}
*
Contains channels that can be written to in order to update the project.
type SearchRequest ¶
type SearchRequest struct {
// Values: "search" or "files"
Type string `json:"type"`
ProjectRoot string `json:"projectRoot"`
// Command timeout duration - only for 'search'-type requests
Duration string `json:"string"`
Data string `json:"data"`
}
Input to an "Execute" call should be a serialized SearchRequest
type SearchResponse ¶
type SearchResponse struct {
Index IndexedProject `json:"index"`
Results SearchResults `json:"results"`
Error string `json:"error"`
}
type SearchResults ¶
type SearchResults struct {
Files []PogoFileMatch `json:"files"`
}
Click to show internal directories.
Click to hide internal directories.