search

package
v0.0.0-...-2c2b76d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 3, 2024 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const UseWatchers = true

Variables

This section is empty.

Functions

func New

func New() func() (pogoPlugin.IPogoPlugin, error)

func ParseGitIgnore

func ParseGitIgnore(path string) (*ignore.GitIgnore, error)

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) GetFiles

func (g *BasicSearch) GetFiles(projectRoot string) (*IndexedProject, error)

func (*BasicSearch) Index

func (g *BasicSearch) Index(req *pogoPlugin.IProcessProjectReq)

func (*BasicSearch) Info

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) Search

func (g *BasicSearch) Search(projectRoot string, data string, duration string) (*SearchResults, error)

type ErrorResponse

type ErrorResponse struct {
	ErrorCode int    `json:"errorCode"`
	Error     string `json:"error"`
}

type IndexedProject

type IndexedProject struct {
	Root  string   `json:"root"`
	Paths []string `json:"paths"`
}

type PogoChunkMatch

type PogoChunkMatch struct {
	Line    uint32 `json:"line"`
	Content string `json:"content"`
}

type PogoFileMatch

type PogoFileMatch struct {
	Path    string           `json:"path"`
	Matches []PogoChunkMatch `json:"matches"`
}

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"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL