web

package
v0.0.0-...-59cb0c6 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMux

func NewMux(s *Server) (*http.ServeMux, error)

Types

type CmPoint

type CmPoint struct {
	Line int `json:"line"`
	Ch   int `json:"ch"`
}

type CmRange

type CmRange struct {
	From CmPoint `json:"from"`
	To   CmPoint `json:"to"`
}

type FileTree

type FileTree struct {
	// For now we use repo:path format. Name for backwards compatibility.
	// Should be unique.
	KytheUri string `json:"kytheUri"`

	// The name displayed in the tree - either a repository, or a path component.
	Display string `json:"display"`

	// Usually generated files are not indexed in Zoekt, only source.
	OnlyGenerated bool `json:"onlyGenerated"`

	// True if file, false if directory.
	IsFile bool `json:"isFile"`

	// nil means unknown, client should make a further request to discover.
	// only meaningful for directories.
	Children *[]FileTree `json:"children"`
}

type Server

type Server struct {
	Searcher zoekt.Searcher

	// Version string for this server.
	Version string
	// contains filtered or unexported fields
}

type UhDisplayedFile

type UhDisplayedFile struct {
	FileTicket  string `json:"dfFileTicket"`
	DisplayName string `json:"dfDisplayName"`
}

type UhFileSites

type UhFileSites struct {
	ContainingFile UhDisplayedFile  `json:"sContainingFile"`
	IsDupOf        *UhDisplayedFile `json:"sDupOfFile"`
	Snippets       []UhSnippet      `json:"sSnippets"`
}

type UhRefCounts

type UhRefCounts struct {
	Lines int `json:"rcLines"`
	Files int `json:"rcFiles"`
	// Exact file content match.
	DupFiles int `json:"rcDupFiles"`
	// The lines found in a given file are the same (other lines can differ).
	// Greater than or equal to DupFiles.
	DupMatches int `json:"rcDupMatches"`
}

type UhSiteGroup

type UhSiteGroup struct {
	Files []UhFileSites `json:"sFileSites"`
}

type UhSnippet

type UhSnippet struct {
	Text           string  `json:"snippetText"`
	FullSpan       CmRange `json:"snippetFullSpan"`
	OccurrenceSpan CmRange `json:"snippetOccurrenceSpan"`
}

type UhXRefReply

type UhXRefReply struct {
	Refs      []UhSiteGroup `json:"refs"`
	RefCounts UhRefCounts   `json:"refCounts"`
	// Below unused by zoekt-underhood, populated to default values.
	Calls        []string `json:"calls"`
	CallCount    int      `json:"callCount"`
	Definitions  []string `json:"definitions"`
	Declarations []string `json:"declarations"`
}

Mirrors Underhood's XRefReply (though the two converged away from original Kythe-only).

Jump to

Keyboard shortcuts

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