protocol

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2020 License: MIT Imports: 1 Imported by: 0

README

LSIF protocol utilities for Go

This repository contains LSIF protocol struct definitions.

Documentation

Index

Constants

View Source
const PositionEncoding = "utf-16"
View Source
const Version = "0.4.3"

Variables

This section is empty.

Functions

This section is empty.

Types

type Contains

type Contains struct {
	Edge
	OutV uint64   `json:"outV"`
	InVs []uint64 `json:"inVs"`
}

func NewContains

func NewContains(id, outV uint64, inVs []uint64) Contains

type DefinitionResult

type DefinitionResult struct {
	Vertex
}

func NewDefinitionResult

func NewDefinitionResult(id uint64) DefinitionResult

type Document

type Document struct {
	Vertex
	URI        string `json:"uri"`
	LanguageID string `json:"languageId"`
}

func NewDocument

func NewDocument(id uint64, languageID, uri string) Document

type Edge

type Edge struct {
	Element
	Label EdgeLabel `json:"label"`
}

type EdgeLabel

type EdgeLabel string
const (
	EdgeContains                   EdgeLabel = "contains"
	EdgeItem                       EdgeLabel = "item"
	EdgeNext                       EdgeLabel = "next"
	EdgeMoniker                    EdgeLabel = "moniker"
	EdgeNextMoniker                EdgeLabel = "nextMoniker"
	EdgePackageInformation         EdgeLabel = "packageInformation"
	EdgeTextDocumentDocumentSymbol EdgeLabel = "textDocument/documentSymbol"
	EdgeTextDocumentFoldingRange   EdgeLabel = "textDocument/foldingRange"
	EdgeTextDocumentDocumentLink   EdgeLabel = "textDocument/documentLink"
	EdgeTextDocumentDiagnostic     EdgeLabel = "textDocument/diagnostic"
	EdgeTextDocumentDefinition     EdgeLabel = "textDocument/definition"
	EdgeTextDocumentDeclaration    EdgeLabel = "textDocument/declaration"
	EdgeTextDocumentTypeDefinition EdgeLabel = "textDocument/typeDefinition"
	EdgeTextDocumentHover          EdgeLabel = "textDocument/hover"
	EdgeTextDocumentReferences     EdgeLabel = "textDocument/references"
	EdgeTextDocumentImplementation EdgeLabel = "textDocument/implementation"
)

type Element

type Element struct {
	ID   uint64      `json:"id"`
	Type ElementType `json:"type"`
}

type ElementType

type ElementType string
const (
	ElementVertex ElementType = "vertex"
	ElementEdge   ElementType = "edge"
)

type HoverResult

type HoverResult struct {
	Vertex
	Result hoverResult `json:"result"`
}

func NewHoverResult

func NewHoverResult(id uint64, contents []MarkedString) HoverResult

type Item

type Item struct {
	Edge
	OutV     uint64   `json:"outV"`
	InVs     []uint64 `json:"inVs"`
	Document uint64   `json:"document"`
	Property string   `json:"property,omitempty"`
}

func NewItem

func NewItem(id, outV uint64, inVs []uint64, document uint64) Item

func NewItemOfDefinitions

func NewItemOfDefinitions(id, outV uint64, inVs []uint64, document uint64) Item

func NewItemOfReferences

func NewItemOfReferences(id, outV uint64, inVs []uint64, document uint64) Item

func NewItemWithProperty

func NewItemWithProperty(id, outV uint64, inVs []uint64, document uint64, property string) Item

type MarkedString

type MarkedString markedString

func NewMarkedString

func NewMarkedString(s, languageID string) MarkedString

func RawMarkedString

func RawMarkedString(s string) MarkedString

func (MarkedString) MarshalJSON

func (m MarkedString) MarshalJSON() ([]byte, error)

type MetaData

type MetaData struct {
	Vertex
	Version          string   `json:"version"`
	ProjectRoot      string   `json:"projectRoot"`
	PositionEncoding string   `json:"positionEncoding"`
	ToolInfo         ToolInfo `json:"toolInfo"`
}

func NewMetaData

func NewMetaData(id uint64, root string, info ToolInfo) MetaData

type Moniker

type Moniker struct {
	Vertex
	Kind       string `json:"kind"`
	Scheme     string `json:"scheme"`
	Identifier string `json:"identifier"`
}

func NewMoniker

func NewMoniker(id uint64, kind, scheme, identifier string) Moniker

type MonikerEdge

type MonikerEdge struct {
	Edge
	OutV uint64 `json:"outV"`
	InV  uint64 `json:"inV"`
}

func NewMonikerEdge

func NewMonikerEdge(id, outV, inV uint64) MonikerEdge

type Next

type Next struct {
	Edge
	OutV uint64 `json:"outV"`
	InV  uint64 `json:"inV"`
}

func NewNext

func NewNext(id, outV, inV uint64) Next

type NextMonikerEdge

type NextMonikerEdge struct {
	Edge
	OutV uint64 `json:"outV"`
	InV  uint64 `json:"inV"`
}

func NewNextMonikerEdge

func NewNextMonikerEdge(id, outV, inV uint64) NextMonikerEdge

type PackageInformation

type PackageInformation struct {
	Vertex
	Name    string `json:"name"`
	Manager string `json:"manager"`
	Version string `json:"version"`
}

func NewPackageInformation

func NewPackageInformation(id uint64, name, manager, version string) PackageInformation

type PackageInformationEdge

type PackageInformationEdge struct {
	Edge
	OutV uint64 `json:"outV"`
	InV  uint64 `json:"inV"`
}

func NewPackageInformationEdge

func NewPackageInformationEdge(id, outV, inV uint64) PackageInformationEdge

type Pos

type Pos struct {
	Line      int `json:"line"`
	Character int `json:"character"`
}

type Project

type Project struct {
	Vertex
	Kind string `json:"kind"`
}

func NewProject

func NewProject(id uint64, languageID string) Project

type Range

type Range struct {
	Vertex
	Start Pos `json:"start"`
	End   Pos `json:"end"`
}

func NewRange

func NewRange(id uint64, start, end Pos) Range

type ReferenceResult

type ReferenceResult struct {
	Vertex
}

type ResultSet

type ResultSet struct {
	Vertex
}

func NewReferenceResult

func NewReferenceResult(id uint64) ResultSet

func NewResultSet

func NewResultSet(id uint64) ResultSet

type TextDocumentDefinition

type TextDocumentDefinition struct {
	Edge
	OutV uint64 `json:"outV"`
	InV  uint64 `json:"inV"`
}

func NewTextDocumentDefinition

func NewTextDocumentDefinition(id, outV, inV uint64) TextDocumentDefinition

type TextDocumentHover

type TextDocumentHover struct {
	Edge
	OutV uint64 `json:"outV"`
	InV  uint64 `json:"inV"`
}

func NewTextDocumentHover

func NewTextDocumentHover(id, outV, inV uint64) TextDocumentHover

type TextDocumentReferences

type TextDocumentReferences struct {
	Edge
	OutV uint64 `json:"outV"`
	InV  uint64 `json:"inV"`
}

func NewTextDocumentReferences

func NewTextDocumentReferences(id, outV, inV uint64) TextDocumentReferences

type ToolInfo

type ToolInfo struct {
	Name    string   `json:"name"`
	Version string   `json:"version,omitempty"`
	Args    []string `json:"args,omitempty"`
}

type Vertex

type Vertex struct {
	Element
	Label VertexLabel `json:"label"`
}

type VertexLabel

type VertexLabel string
const (
	VertexMetaData             VertexLabel = "metaData"
	VertexProject              VertexLabel = "project"
	VertexRange                VertexLabel = "range"
	VertexLocation             VertexLabel = "location"
	VertexDocument             VertexLabel = "document"
	VertexMoniker              VertexLabel = "moniker"
	VertexPackageInformation   VertexLabel = "packageInformation"
	VertexResultSet            VertexLabel = "resultSet"
	VertexDocumentSymbolResult VertexLabel = "documentSymbolResult"
	VertexFoldingRangeResult   VertexLabel = "foldingRangeResult"
	VertexDocumentLinkResult   VertexLabel = "documentLinkResult"
	VertexDianosticResult      VertexLabel = "diagnosticResult"
	VertexDeclarationResult    VertexLabel = "declarationResult"
	VertexDefinitionResult     VertexLabel = "definitionResult"
	VertexTypeDefinitionResult VertexLabel = "typeDefinitionResult"
	VertexHoverResult          VertexLabel = "hoverResult"
	VertexReferenceResult      VertexLabel = "referenceResult"
	VertexImplementationResult VertexLabel = "implementationResult"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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