hover

package
v0.0.0-...-dfd24c6 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewIssueHoverIsDisplayedProperties

func NewIssueHoverIsDisplayedProperties(issue vulnmap.Issue) ux.IssueHoverIsDisplayedProperties

Types

type Context

type Context any

type DefaultHoverService

type DefaultHoverService struct {
	// contains filtered or unexported fields
}

func (*DefaultHoverService) Channel

func (s *DefaultHoverService) Channel() chan DocumentHovers

func (*DefaultHoverService) ClearAllHovers

func (s *DefaultHoverService) ClearAllHovers()

func (*DefaultHoverService) DeleteHover

func (s *DefaultHoverService) DeleteHover(path string)

func (*DefaultHoverService) GetHover

func (s *DefaultHoverService) GetHover(path string, pos vulnmap.Position) Result

func (*DefaultHoverService) SetAnalytics

func (s *DefaultHoverService) SetAnalytics(analytics ux2.Analytics)

type DocumentHovers

type DocumentHovers struct {
	Path  string
	Hover []Hover[Context]
}

type FakeHoverService

type FakeHoverService struct {
	// contains filtered or unexported fields
}

func NewFakeHoverService

func NewFakeHoverService() *FakeHoverService

func (*FakeHoverService) Calls

func (t *FakeHoverService) Calls() int

func (*FakeHoverService) Channel

func (t *FakeHoverService) Channel() chan DocumentHovers

func (*FakeHoverService) ClearAllHovers

func (t *FakeHoverService) ClearAllHovers()

func (*FakeHoverService) DeleteHover

func (t *FakeHoverService) DeleteHover(_ string)

func (*FakeHoverService) GetHover

func (t *FakeHoverService) GetHover(_ string, _ vulnmap.Position) Result

func (*FakeHoverService) SetAnalytics

func (t *FakeHoverService) SetAnalytics(_ ux2.Analytics)

type Hover

type Hover[T Context] struct {
	Id      string
	Range   vulnmap.Range
	Message string
	Context T // this normally contains vulnmap.Issue
}

type MarkupContent

type MarkupContent struct {
	Kind  string `json:"kind"`
	Value string `json:"value"`
}

type Params

type Params struct {
	TextDocument sglsp.TextDocumentIdentifier `json:"textDocument"`
	Position     sglsp.Position               `json:"position"`
}

type Result

type Result struct {
	Contents MarkupContent `json:"contents"`
}

type Service

type Service interface {
	DeleteHover(path string)
	Channel() chan DocumentHovers
	ClearAllHovers()
	GetHover(path string, pos vulnmap.Position) Result
	SetAnalytics(analytics ux2.Analytics)
}

func NewDefaultService

func NewDefaultService(analytics ux2.Analytics) Service

Jump to

Keyboard shortcuts

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