Documentation ¶
Index ¶
- Constants
- Variables
- func IsDevelopment() bool
- func SetCurrentConfig(config *Config)
- type CliSettings
- type Config
- func (c *Config) AddBinaryLocationsToPath(searchDirectories []string)
- func (c *Config) AuthenticationMethod() types.AuthenticationMethod
- func (c *Config) AutomaticAuthentication() bool
- func (c *Config) CLIDownloadLockFileName() (string, error)
- func (c *Config) CliSettings() *CliSettings
- func (c *Config) ClientCapabilities() types.ClientCapabilities
- func (c *Config) ClientProtocolVersion() string
- func (c *Config) ConfigureLogging(server types.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() types.SeverityFilter
- func (c *Config) FindBinaryInDirs(binaryName string) (foundPath string)
- func (c *Config) FolderConfig(path string) *types.FolderConfig
- func (c *Config) Format() string
- func (c *Config) HoverVerbosity() int
- 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) IsDeltaFindingsEnabled() bool
- func (c *Config) IsErrorReportingEnabled() bool
- func (c *Config) IsFedramp() bool
- func (c *Config) IsProductEnabled(p product.Product) 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) IsSnykOSSQuickFixCodeActionsEnabled() bool
- func (c *Config) IsSnykOpenBrowserActionEnabled() bool
- func (c *Config) IsSnykOssEnabled() bool
- func (c *Config) IsTrustedFolderFeatureEnabled() bool
- 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) Offline() 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) SetAdditionalParameters(path string, parameters []string)
- func (c *Config) SetAuthenticationMethod(authMethod types.AuthenticationMethod)
- func (c *Config) SetAutomaticAuthentication(value bool)
- func (c *Config) SetAutomaticScanning(value bool)
- func (c *Config) SetCliSettings(settings *CliSettings)
- func (c *Config) SetClientCapabilities(capabilities types.ClientCapabilities)
- func (c *Config) SetClientProtocolVersion(requiredProtocolVersion string)
- func (c *Config) SetConfigFile(configFile string)
- func (c *Config) SetDeltaFindingsEnabled(enabled bool)
- 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) SetHoverVerbosity(verbosity int)
- 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) SetOffline(b 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 types.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) SetSnykOSSQuickFixCodeActionsEnabled(enabled bool)
- func (c *Config) SetSnykOpenBrowserActionsEnabled(enable bool)
- func (c *Config) SetSnykOssEnabled(enabled bool)
- func (c *Config) SetStorage(s storage.StorageWithCallbacks)
- func (c *Config) SetToken(token string)
- func (c *Config) SetTrustedFolderFeatureEnabled(enabled bool)
- func (c *Config) SetTrustedFolders(folderPaths []string)
- func (c *Config) SetWorkspace(workspace types.Workspace)
- func (c *Config) SnykApi() string
- func (c *Config) SnykCodeAnalysisTimeout() time.Duration
- func (c *Config) SnykCodeApi() string
- func (c *Config) SnykUI() string
- func (c *Config) Storage() 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
- func (c *Config) Workspace() types.Workspace
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" )
View Source
const ( FormatHtml = "html" FormatMd = "md" DefaultSnykApiUrl = "https://api.snyk.io" DefaultSnykUiUrl = "https://app.snyk.io" 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)
Types ¶
type CliSettings ¶
type CliSettings struct { Insecure bool AdditionalOssParameters []string C *Config // contains filtered or unexported fields }
func NewCliSettings ¶
func NewCliSettings(c *Config) *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 NewFromExtension ¶
func (*Config) AddBinaryLocationsToPath ¶
func (*Config) AuthenticationMethod ¶
func (c *Config) AuthenticationMethod() types.AuthenticationMethod
func (*Config) AutomaticAuthentication ¶
func (*Config) CLIDownloadLockFileName ¶
func (*Config) CliSettings ¶
func (c *Config) CliSettings() *CliSettings
func (*Config) ClientCapabilities ¶
func (c *Config) ClientCapabilities() types.ClientCapabilities
func (*Config) ClientProtocolVersion ¶
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() types.SeverityFilter
func (*Config) FindBinaryInDirs ¶
func (*Config) FolderConfig ¶
func (c *Config) FolderConfig(path string) *types.FolderConfig
func (*Config) HoverVerbosity ¶
func (*Config) IdeVersion ¶
func (*Config) IntegrationName ¶
func (*Config) IntegrationVersion ¶
func (*Config) IsAnalyticsPermitted ¶
func (*Config) IsAutoScanEnabled ¶
func (*Config) IsDeltaFindingsEnabled ¶
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) IsSnykOSSQuickFixCodeActionsEnabled ¶
func (*Config) IsSnykOpenBrowserActionEnabled ¶
func (*Config) IsSnykOssEnabled ¶
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) SetAdditionalParameters ¶
func (*Config) SetAuthenticationMethod ¶
func (c *Config) SetAuthenticationMethod(authMethod types.AuthenticationMethod)
func (*Config) SetAutomaticAuthentication ¶
func (*Config) SetAutomaticScanning ¶
func (*Config) SetCliSettings ¶
func (c *Config) SetCliSettings(settings *CliSettings)
func (*Config) SetClientCapabilities ¶
func (c *Config) SetClientCapabilities(capabilities types.ClientCapabilities)
func (*Config) SetClientProtocolVersion ¶
func (*Config) SetConfigFile ¶
func (*Config) SetDeltaFindingsEnabled ¶
func (*Config) SetDeviceID ¶
func (*Config) SetErrorReportingEnabled ¶
func (*Config) SetHoverVerbosity ¶
func (*Config) SetIdeName ¶
func (*Config) SetIdeVersion ¶
func (*Config) SetIntegrationName ¶
func (*Config) SetIntegrationVersion ¶
func (*Config) SetLogLevel ¶
func (*Config) SetLogPath ¶
func (*Config) SetManageBinariesAutomatically ¶
func (*Config) SetOffline ¶
func (*Config) SetOrganization ¶
func (*Config) SetOsPlatform ¶
func (*Config) SetRuntimeName ¶
func (*Config) SetRuntimeVersion ¶
func (*Config) SetSeverityFilter ¶
func (c *Config) SetSeverityFilter(severityFilter types.SeverityFilter) bool
func (*Config) SetSnykAdvisorEnabled ¶
func (*Config) SetSnykCodeApi ¶
func (*Config) SetSnykCodeEnabled ¶
func (*Config) SetSnykContainerEnabled ¶
func (*Config) SetSnykIacEnabled ¶
func (*Config) SetSnykLearnCodeActionsEnabled ¶
func (*Config) SetSnykOSSQuickFixCodeActionsEnabled ¶
func (*Config) SetSnykOpenBrowserActionsEnabled ¶
func (*Config) SetSnykOssEnabled ¶
func (*Config) SetStorage ¶
func (c *Config) SetStorage(s storage.StorageWithCallbacks)
func (*Config) SetTrustedFolderFeatureEnabled ¶
func (*Config) SetTrustedFolders ¶
func (*Config) SetWorkspace ¶
func (*Config) SnykCodeAnalysisTimeout ¶
func (*Config) SnykCodeApi ¶
func (*Config) Storage ¶
func (c *Config) Storage() 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 ¶
Click to show internal directories.
Click to hide internal directories.