Documentation
¶
Index ¶
- Variables
- type Docs
- type Document
- type DocumentRange
- type HoverRef
- type Hovers
- type Id
- type Item
- type Line
- type Metadata
- type Next
- type Offset
- type Parser
- type Range
- type Ranges
- type RawData
- type RawItem
- type RawRange
- type RawResult
- type References
- type ReferencesOffset
- type ResultSetRef
- type SerializedRange
- type SerializedReference
- type TextReference
Constants ¶
This section is empty.
Variables ¶
View Source
var (
Lsif = "lsif"
)
Functions ¶
This section is empty.
Types ¶
type DocumentRange ¶
type Ranges ¶
type RawResult ¶
type RawResult struct {
Contents json.RawMessage `json:"contents"`
}
type References ¶
type References struct {
Items *cache
Offsets *cache
CurrentOffsetId Id
}
func NewReferences ¶
func NewReferences() (*References, error)
func (*References) Close ¶
func (r *References) Close() error
func (*References) For ¶
func (r *References) For(docs map[Id]string, refId Id) []SerializedReference
func (*References) GetItems ¶
func (r *References) GetItems(refId Id) []Item
func (*References) Store ¶
func (r *References) Store(refId Id, references []Item) error
Store is responsible for keeping track of references that will be used when serializing in `For`.
The references are stored in a file to cache them. It is like `map[Id][]Item` (where `Id` is `refId`) but relies on caching the array and its offset in files for storage to reduce RAM usage. The items can be fetched by calling `GetItems`.
type ReferencesOffset ¶
type ResultSetRef ¶
type SerializedRange ¶
type SerializedRange struct {
StartLine int32 `json:"start_line"`
StartChar int32 `json:"start_char"`
DefinitionPath string `json:"definition_path,omitempty"`
Hover json.RawMessage `json:"hover"`
References []SerializedReference `json:"references,omitempty"`
}
type SerializedReference ¶
type SerializedReference struct {
Path string `json:"path"`
}
Click to show internal directories.
Click to hide internal directories.