Documentation
¶
Index ¶
- func ConvertDiagnostic(diagnostic Diagnostic, words []string, source string, rng protocol.Range, ...) protocol.Diagnostic
- type Description
- type Diagnostic
- type Edit
- type Image
- type ImageRequest
- type ImageResponse
- type Info
- type LanguageGatewayClient
- type LanguageGatewayClientImpl
- type Link
- type ScoutImageKey
- type Service
- type ServiceImpl
- func (s *ServiceImpl) Analyze(image string) ([]Diagnostic, error)
- func (s *ServiceImpl) CalculateDiagnostics(ctx context.Context, source string, doc document.Document) ([]protocol.Diagnostic, error)
- func (s *ServiceImpl) CollectDiagnostics(source, workspaceFolder string, doc document.Document, text string) []protocol.Diagnostic
- func (s *ServiceImpl) Hover(ctx context.Context, image string) (*protocol.Hover, error)
- func (c *ServiceImpl) SupportsLanguageIdentifier(languageIdentifier protocol.LanguageIdentifier) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertDiagnostic ¶
func ConvertDiagnostic(diagnostic Diagnostic, words []string, source string, rng protocol.Range, edits []Edit) protocol.Diagnostic
Types ¶
type Description ¶
type Diagnostic ¶
type ImageRequest ¶
type ImageResponse ¶
type ImageResponse struct { Image Image `json:"image"` Diagnostics []Diagnostic `json:"diagnostics"` Edits []Edit `json:"edits"` Infos []Info `json:"infos"` }
type Info ¶
type Info struct { Kind string `json:"kind"` Description Description `json:"description"` }
type LanguageGatewayClient ¶
type LanguageGatewayClient interface { PostImage(ctx context.Context, jwt, image string) (ImageResponse, error) Fetch(key cache.Key) (ImageResponse, error) }
func NewLanguageGatewayClient ¶
func NewLanguageGatewayClient() LanguageGatewayClient
type LanguageGatewayClientImpl ¶
type LanguageGatewayClientImpl struct {
// contains filtered or unexported fields
}
func (LanguageGatewayClientImpl) Fetch ¶
func (c LanguageGatewayClientImpl) Fetch(key cache.Key) (ImageResponse, error)
func (LanguageGatewayClientImpl) PostImage ¶
func (c LanguageGatewayClientImpl) PostImage(ctx context.Context, jwt, image string) (ImageResponse, error)
PostImage sends an HTTP POST request to /v1/language-gateway/image to retrieve infromation from the Scout Language Gateway. This information can be used for providing diagnostics about the given image.
type ScoutImageKey ¶
type ScoutImageKey struct {
Image string
}
func (*ScoutImageKey) CacheKey ¶
func (k *ScoutImageKey) CacheKey() string
type Service ¶
type Service interface { textdocument.DiagnosticsCollector Analyze(image string) ([]Diagnostic, error) Hover(ctx context.Context, image string) (*protocol.Hover, error) }
func NewService ¶
func NewService() Service
type ServiceImpl ¶
type ServiceImpl struct {
// contains filtered or unexported fields
}
func (*ServiceImpl) Analyze ¶
func (s *ServiceImpl) Analyze(image string) ([]Diagnostic, error)
func (*ServiceImpl) CalculateDiagnostics ¶
func (s *ServiceImpl) CalculateDiagnostics(ctx context.Context, source string, doc document.Document) ([]protocol.Diagnostic, error)
func (*ServiceImpl) CollectDiagnostics ¶
func (s *ServiceImpl) CollectDiagnostics(source, workspaceFolder string, doc document.Document, text string) []protocol.Diagnostic
func (*ServiceImpl) SupportsLanguageIdentifier ¶
func (c *ServiceImpl) SupportsLanguageIdentifier(languageIdentifier protocol.LanguageIdentifier) bool
Click to show internal directories.
Click to hide internal directories.