Documentation ¶
Index ¶
- Constants
- Variables
- func IsDevelopment() bool
- func SetCurrentConfig(config *Config)
- func WithCallbacks(callbacks map[string]StorageCallbackFunc) func(*storage)
- type CliSettings
- type Config
- func (c *Config) AddBinaryLocationsToPath(searchDirectories []string)
- func (c *Config) AuthenticationMethod() lsp.AuthenticationMethod
- func (c *Config) AutomaticAuthentication() bool
- func (c *Config) CLIDownloadLockFileName() string
- func (c *Config) CliSettings() *CliSettings
- func (c *Config) ClientCapabilities() lsp.ClientCapabilities
- func (c *Config) ConfigureLogging(server lsp.Server)
- func (c *Config) DeviceID() string
- func (c *Config) DisableLoggingToFile()
- func (c *Config) DisplayableIssueTypes() map[product.FilterableIssueType]bool
- func (c *Config) EnableSnykCodeQuality(activate bool)
- func (c *Config) EnableSnykCodeSecurity(activate bool)
- func (c *Config) Engine() workflow.Engine
- func (c *Config) FilterSeverity() lsp.SeverityFilter
- func (c *Config) FindBinaryInDirs(binaryName string) (foundPath string)
- func (c *Config) Format() string
- func (c *Config) IdeName() string
- func (c *Config) IdeVersion() string
- func (c *Config) IntegrationName() string
- func (c *Config) IntegrationVersion() string
- func (c *Config) IsAnalyticsPermitted() bool
- func (c *Config) IsAutoScanEnabled() bool
- func (c *Config) IsErrorReportingEnabled() bool
- func (c *Config) IsFedramp() bool
- func (c *Config) IsSnykAdvisorEnabled() bool
- func (c *Config) IsSnykCodeEnabled() bool
- func (c *Config) IsSnykCodeQualityEnabled() bool
- func (c *Config) IsSnykCodeSecurityEnabled() bool
- func (c *Config) IsSnykContainerEnabled() bool
- func (c *Config) IsSnykIacEnabled() bool
- func (c *Config) IsSnykLearnCodeActionsEnabled() bool
- func (c *Config) IsSnykOssEnabled() bool
- func (c *Config) IsTelemetryEnabled() bool
- func (c *Config) IsTrustedFolderFeatureEnabled() bool
- func (c *Config) Load()
- func (c *Config) LogLevel() string
- func (c *Config) LogPath() string
- func (c *Config) Logger() *zerolog.Logger
- func (c *Config) ManageBinariesAutomatically() bool
- func (c *Config) ManageCliBinariesAutomatically() bool
- func (c *Config) NonEmptyToken() bool
- func (c *Config) Organization() string
- func (c *Config) OsArch() string
- func (c *Config) OsPlatform() string
- func (c *Config) Path() string
- func (c *Config) RuntimeName() string
- func (c *Config) RuntimeVersion() string
- func (c *Config) SetAuthenticationMethod(method lsp.AuthenticationMethod)
- func (c *Config) SetAutomaticAuthentication(value bool)
- func (c *Config) SetAutomaticScanning(value bool)
- func (c *Config) SetCliSettings(settings *CliSettings)
- func (c *Config) SetClientCapabilities(capabilities lsp.ClientCapabilities)
- func (c *Config) SetConfigFile(configFile string)
- func (c *Config) SetDeviceID(deviceId string)
- func (c *Config) SetEngine(engine workflow.Engine)
- func (c *Config) SetErrorReportingEnabled(enabled bool)
- func (c *Config) SetFormat(format string)
- func (c *Config) SetIdeName(ideName string)
- func (c *Config) SetIdeVersion(ideVersion string)
- func (c *Config) SetIntegrationName(integrationName string)
- func (c *Config) SetIntegrationVersion(integrationVersion string)
- func (c *Config) SetLogLevel(level string)
- func (c *Config) SetLogPath(logPath string)
- func (c *Config) SetManageBinariesAutomatically(enabled bool)
- func (c *Config) SetOrganization(organization string)
- func (c *Config) SetOsArch(osArch string)
- func (c *Config) SetOsPlatform(osPlatform string)
- func (c *Config) SetRuntimeName(runtimeName string)
- func (c *Config) SetRuntimeVersion(runtimeVersion string)
- func (c *Config) SetSeverityFilter(severityFilter lsp.SeverityFilter) bool
- func (c *Config) SetSnykAdvisorEnabled(enabled bool)
- func (c *Config) SetSnykCodeApi(snykCodeApiUrl string)
- func (c *Config) SetSnykCodeEnabled(enabled bool)
- func (c *Config) SetSnykContainerEnabled(enabled bool)
- func (c *Config) SetSnykIacEnabled(enabled bool)
- func (c *Config) SetSnykLearnCodeActionsEnabled(enabled bool)
- func (c *Config) SetSnykOssEnabled(enabled bool)
- func (c *Config) SetTelemetryEnabled(enabled bool)
- func (c *Config) SetToken(token string)
- func (c *Config) SetTrustedFolderFeatureEnabled(enabled bool)
- func (c *Config) SetTrustedFolders(folderPaths []string)
- func (c *Config) SnykApi() string
- func (c *Config) SnykCodeAnalysisTimeout() time.Duration
- func (c *Config) SnykCodeApi() string
- func (c *Config) Storage() StorageWithCallbacks
- func (c *Config) Token() string
- func (c *Config) TokenAsOAuthToken() (oauth2.Token, error)
- func (c *Config) TokenChangesChannel() <-chan string
- func (c *Config) TrustedFolders() []string
- func (c *Config) UpdateApiEndpoints(snykApiUrl string) bool
- type StorageCallbackFunc
- type StorageWithCallbacks
Constants ¶
View Source
const ( ActivateSnykOssKey = "ACTIVATE_SNYK_OPEN_SOURCE" ActivateSnykCodeKey = "ACTIVATE_SNYK_CODE" ActivateSnykIacKey = "ACTIVATE_SNYK_IAC" ActivateSnykContainerKey = "ACTIVATE_SNYK_CONTAINER" ActivateSnykAdvisorKey = "ACTIVATE_SNYK_ADVISOR" SendErrorReportsKey = "SEND_ERROR_REPORTS" Organization = "SNYK_CFG_ORG" EnableTelemetry = "SNYK_CFG_DISABLE_ANALYTICS" )
View Source
const ( FormatHtml = "html" FormatMd = "md" DefaultSnykApiUrl = "https://snyk.io/api" DefaultDeeproxyApiUrl = "https://deeproxy.snyk.io" )
Variables ¶
View Source
var ( Version = "SNAPSHOT" LsProtocolVersion = "development" Development = "true" LicenseInformation = "License information\n FILLED DURING BUILD" )
Functions ¶
func IsDevelopment ¶
func IsDevelopment() bool
func SetCurrentConfig ¶
func SetCurrentConfig(config *Config)
func WithCallbacks ¶
func WithCallbacks(callbacks map[string]StorageCallbackFunc) func(*storage)
Types ¶
type CliSettings ¶
type CliSettings struct { Insecure bool AdditionalOssParameters []string // contains filtered or unexported fields }
func NewCliSettings ¶
func NewCliSettings() *CliSettings
func (*CliSettings) CliPathFileInfo ¶
func (c *CliSettings) CliPathFileInfo() (os.FileInfo, error)
func (*CliSettings) DefaultBinaryInstallPath ¶
func (c *CliSettings) DefaultBinaryInstallPath() string
func (*CliSettings) Installed ¶
func (c *CliSettings) Installed() bool
func (*CliSettings) IsPathDefined ¶
func (c *CliSettings) IsPathDefined() bool
func (*CliSettings) Path ¶
func (c *CliSettings) Path() string
Path returns the full path to the CLI executable that is stored in the CLI configuration
func (*CliSettings) SetPath ¶
func (c *CliSettings) SetPath(path string)
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
func CurrentConfig ¶
func CurrentConfig() *Config
func (*Config) AddBinaryLocationsToPath ¶
func (*Config) AuthenticationMethod ¶
func (c *Config) AuthenticationMethod() lsp.AuthenticationMethod
func (*Config) AutomaticAuthentication ¶
func (*Config) CLIDownloadLockFileName ¶
func (*Config) CliSettings ¶
func (c *Config) CliSettings() *CliSettings
func (*Config) ClientCapabilities ¶
func (c *Config) ClientCapabilities() lsp.ClientCapabilities
func (*Config) ConfigureLogging ¶
func (*Config) DisableLoggingToFile ¶
func (c *Config) DisableLoggingToFile()
DisableLoggingToFile closes the open log file and sets the global logger back to it's default
func (*Config) DisplayableIssueTypes ¶
func (c *Config) DisplayableIssueTypes() map[product.FilterableIssueType]bool
func (*Config) EnableSnykCodeQuality ¶
func (*Config) EnableSnykCodeSecurity ¶
func (*Config) FilterSeverity ¶
func (c *Config) FilterSeverity() lsp.SeverityFilter
func (*Config) FindBinaryInDirs ¶
func (*Config) IdeVersion ¶
func (*Config) IntegrationName ¶
func (*Config) IntegrationVersion ¶
func (*Config) IsAnalyticsPermitted ¶
func (*Config) IsAutoScanEnabled ¶
func (*Config) IsErrorReportingEnabled ¶
func (*Config) IsSnykAdvisorEnabled ¶
func (*Config) IsSnykCodeEnabled ¶
func (*Config) IsSnykCodeQualityEnabled ¶
func (*Config) IsSnykCodeSecurityEnabled ¶
func (*Config) IsSnykContainerEnabled ¶
func (*Config) IsSnykIacEnabled ¶
func (*Config) IsSnykLearnCodeActionsEnabled ¶
func (*Config) IsSnykOssEnabled ¶
func (*Config) IsTelemetryEnabled ¶
func (*Config) IsTrustedFolderFeatureEnabled ¶
func (*Config) ManageBinariesAutomatically ¶
func (*Config) ManageCliBinariesAutomatically ¶
func (*Config) NonEmptyToken ¶
func (*Config) Organization ¶
func (*Config) OsPlatform ¶
func (*Config) RuntimeName ¶
func (*Config) RuntimeVersion ¶
func (*Config) SetAuthenticationMethod ¶
func (c *Config) SetAuthenticationMethod(method lsp.AuthenticationMethod)
func (*Config) SetAutomaticAuthentication ¶
func (*Config) SetAutomaticScanning ¶
func (*Config) SetCliSettings ¶
func (c *Config) SetCliSettings(settings *CliSettings)
func (*Config) SetClientCapabilities ¶
func (c *Config) SetClientCapabilities(capabilities lsp.ClientCapabilities)
func (*Config) SetConfigFile ¶
func (*Config) SetDeviceID ¶
func (*Config) SetErrorReportingEnabled ¶
func (*Config) SetIdeName ¶
func (*Config) SetIdeVersion ¶
func (*Config) SetIntegrationName ¶
func (*Config) SetIntegrationVersion ¶
func (*Config) SetLogLevel ¶
func (*Config) SetLogPath ¶
func (*Config) SetManageBinariesAutomatically ¶
func (*Config) SetOrganization ¶
func (*Config) SetOsPlatform ¶
func (*Config) SetRuntimeName ¶
func (*Config) SetRuntimeVersion ¶
func (*Config) SetSeverityFilter ¶
func (c *Config) SetSeverityFilter(severityFilter lsp.SeverityFilter) bool
func (*Config) SetSnykAdvisorEnabled ¶
func (*Config) SetSnykCodeApi ¶
func (*Config) SetSnykCodeEnabled ¶
func (*Config) SetSnykContainerEnabled ¶
func (*Config) SetSnykIacEnabled ¶
func (*Config) SetSnykLearnCodeActionsEnabled ¶
func (*Config) SetSnykOssEnabled ¶
func (*Config) SetTelemetryEnabled ¶
func (*Config) SetTrustedFolderFeatureEnabled ¶
func (*Config) SetTrustedFolders ¶
func (*Config) SnykCodeAnalysisTimeout ¶
func (*Config) SnykCodeApi ¶
func (*Config) Storage ¶
func (c *Config) Storage() StorageWithCallbacks
func (*Config) TokenChangesChannel ¶
TokenChangesChannel returns a channel that will be written into once the token has changed. This allows aborting operations when the token is changed.
func (*Config) TrustedFolders ¶
func (*Config) UpdateApiEndpoints ¶
type StorageCallbackFunc ¶
type StorageWithCallbacks ¶
type StorageWithCallbacks interface { configuration.Storage RegisterCallback(key string, callback StorageCallbackFunc) UnRegisterCallback(key string) }
func NewStorage ¶
func NewStorage(opts ...storageOption) StorageWithCallbacks
Click to show internal directories.
Click to hide internal directories.