Documentation ¶
Index ¶
- func FilterIssues(issues []vulnmap.Issue, ...) []vulnmap.Issue
- func Set(w *Workspace)
- type Folder
- func (f *Folder) AllIssuesFor(filePath string) (matchingIssues []vulnmap.Issue)
- func (f *Folder) ClearDiagnostics()
- func (f *Folder) ClearDiagnosticsByIssueType(removedType product.FilterableIssueType)
- func (f *Folder) ClearDiagnosticsFromFile(filePath string)
- func (f *Folder) ClearDiagnosticsFromPathRecursively(removedPath string)
- func (f *Folder) ClearScannedStatus()
- func (f *Folder) Contains(path string) bool
- func (f *Folder) DocumentDiagnosticsFromCache(file string) []vulnmap.Issue
- func (f *Folder) FilterAndPublishCachedDiagnostics(product product.Product)
- func (f *Folder) IsScanned() bool
- func (f *Folder) IsTrusted() bool
- func (f *Folder) IssuesFor(filePath string, requestedRange vulnmap.Range) (matchingIssues []vulnmap.Issue)
- func (f *Folder) Name() string
- func (f *Folder) Path() string
- func (f *Folder) ScanFile(ctx context.Context, path string)
- func (f *Folder) ScanFolder(ctx context.Context)
- func (f *Folder) SetStatus(status FolderStatus)
- func (f *Folder) Status() FolderStatus
- type FolderStatus
- type Workspace
- func (w *Workspace) AddFolder(f *Folder)
- func (w *Workspace) ChangeWorkspaceFolders(ctx context.Context, params lsp.DidChangeWorkspaceFoldersParams)
- func (w *Workspace) ClearIssues(_ context.Context)
- func (w *Workspace) ClearIssuesByType(removedType product.FilterableIssueType)
- func (w *Workspace) DeleteFile(filePath string)
- func (w *Workspace) EndRequestTrustCommunication()
- func (w *Workspace) Folders() (folder []*Folder)
- func (w *Workspace) GetFolderContaining(path string) (folder *Folder)
- func (w *Workspace) GetFolderTrust() (trusted []*Folder, untrusted []*Folder)
- func (w *Workspace) IsTrustRequestOngoing() bool
- func (w *Workspace) IssuesFor(path string, r vulnmap.Range) []vulnmap.Issue
- func (w *Workspace) RemoveFolder(folderPath string)
- func (w *Workspace) ScanWorkspace(ctx context.Context)
- func (w *Workspace) StartRequestTrustCommunication()
- func (w *Workspace) TrustFoldersAndScan(ctx context.Context, foldersToBeTrusted []*Folder)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FilterIssues ¶
Types ¶
type Folder ¶
type Folder struct {
// contains filtered or unexported fields
}
Folder contains files that can be scanned, it orchestrates vulnmap scans and provides a caching layer to avoid unnecessary computing
func (*Folder) AllIssuesFor ¶
func (*Folder) ClearDiagnostics ¶
func (f *Folder) ClearDiagnostics()
func (*Folder) ClearDiagnosticsByIssueType ¶
func (f *Folder) ClearDiagnosticsByIssueType(removedType product.FilterableIssueType)
func (*Folder) ClearDiagnosticsFromFile ¶
ClearDiagnosticsFromFile will clear all diagnostics of a file from memory, and send a notification to the client with empty diagnostics results for the specific file
func (*Folder) ClearDiagnosticsFromPathRecursively ¶
func (*Folder) ClearScannedStatus ¶
func (f *Folder) ClearScannedStatus()
func (*Folder) DocumentDiagnosticsFromCache ¶
func (*Folder) FilterAndPublishCachedDiagnostics ¶
func (*Folder) ScanFolder ¶
func (*Folder) SetStatus ¶
func (f *Folder) SetStatus(status FolderStatus)
func (*Folder) Status ¶
func (f *Folder) Status() FolderStatus
type FolderStatus ¶
type FolderStatus int
const ( Unscanned FolderStatus = iota Scanned FolderStatus = iota )
type Workspace ¶
type Workspace struct {
// contains filtered or unexported fields
}
Workspace represents the highest entity in an IDE that contains code. A workspace may contain multiple folders
func New ¶
func New(instrumentor performance.Instrumentor, scanner vulnmap.Scanner, hoverService hover.Service, scanNotifier vulnmap.ScanNotifier, notifier noti.Notifier, ) *Workspace
func (*Workspace) ChangeWorkspaceFolders ¶
func (w *Workspace) ChangeWorkspaceFolders(ctx context.Context, params lsp.DidChangeWorkspaceFoldersParams)
ChangeWorkspaceFolders clears the "Removed" folders, adds the "New" folders, and starts an automatic scan if auto-scans are enabled.
func (*Workspace) ClearIssues ¶
func (*Workspace) ClearIssuesByType ¶
func (w *Workspace) ClearIssuesByType(removedType product.FilterableIssueType)
func (*Workspace) DeleteFile ¶
func (*Workspace) EndRequestTrustCommunication ¶
func (w *Workspace) EndRequestTrustCommunication()
func (*Workspace) GetFolderContaining ¶
func (*Workspace) GetFolderTrust ¶
func (*Workspace) IsTrustRequestOngoing ¶
func (*Workspace) RemoveFolder ¶
func (*Workspace) ScanWorkspace ¶
func (*Workspace) StartRequestTrustCommunication ¶
func (w *Workspace) StartRequestTrustCommunication()
Click to show internal directories.
Click to hide internal directories.