sourcebackend

package
v0.0.0-...-1542595 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 License: BSD-3-Clause Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterByKeywords

func FilterByKeywords(rewritten *url.URL, files []ranking.ResultPath) []ranking.ResultPath

Types

type Server

type Server struct {
	// For forward compatibility
	sourcebackendpb.UnimplementedSourceBackendServer

	Index              *index.Index
	UnpackedPath       string
	IndexPath          string
	UsePositionalIndex bool
	// contains filtered or unexported fields
}

func (*Server) File

Serves a single file for displaying it in /show

func (*Server) Search

Reads a single JSON request from the TCP connection, performs the search and sends results back over the TCP connection as they appear.

type SourceReply

type SourceReply struct {
	// The number of the last used filename, needed for pagination
	LastUsedFilename int

	AllMatches []regexp.Match
}

Jump to

Keyboard shortcuts

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