config

package
v0.0.0-...-9dd78b9 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2024 License: Apache-2.0 Imports: 38 Imported by: 0

Documentation

Index

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 New

func New() *Config

func NewFromExtension

func NewFromExtension(engine workflow.Engine) *Config

func (*Config) AddBinaryLocationsToPath

func (c *Config) AddBinaryLocationsToPath(searchDirectories []string)

func (*Config) AuthenticationMethod

func (c *Config) AuthenticationMethod() types.AuthenticationMethod

func (*Config) AutomaticAuthentication

func (c *Config) AutomaticAuthentication() bool

func (*Config) CLIDownloadLockFileName

func (c *Config) CLIDownloadLockFileName() string

func (*Config) CliSettings

func (c *Config) CliSettings() *CliSettings

func (*Config) ClientCapabilities

func (c *Config) ClientCapabilities() types.ClientCapabilities

func (*Config) ClientProtocolVersion

func (c *Config) ClientProtocolVersion() string

func (*Config) ConfigureLogging

func (c *Config) ConfigureLogging(server types.Server)

func (*Config) DeviceID

func (c *Config) DeviceID() string

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 (c *Config) EnableSnykCodeQuality(activate bool)

func (*Config) EnableSnykCodeSecurity

func (c *Config) EnableSnykCodeSecurity(activate bool)

func (*Config) Engine

func (c *Config) Engine() workflow.Engine

func (*Config) FilterSeverity

func (c *Config) FilterSeverity() types.SeverityFilter

func (*Config) FindBinaryInDirs

func (c *Config) FindBinaryInDirs(binaryName string) (foundPath string)

func (*Config) FolderConfig

func (c *Config) FolderConfig(path string) *types.FolderConfig

func (*Config) Format

func (c *Config) Format() string

func (*Config) HoverVerbosity

func (c *Config) HoverVerbosity() int

func (*Config) IdeName

func (c *Config) IdeName() string

func (*Config) IdeVersion

func (c *Config) IdeVersion() string

func (*Config) IntegrationName

func (c *Config) IntegrationName() string

func (*Config) IntegrationVersion

func (c *Config) IntegrationVersion() string

func (*Config) IsAnalyticsPermitted

func (c *Config) IsAnalyticsPermitted() bool

func (*Config) IsAutoScanEnabled

func (c *Config) IsAutoScanEnabled() bool

func (*Config) IsDeltaFindingsEnabled

func (c *Config) IsDeltaFindingsEnabled() bool

func (*Config) IsErrorReportingEnabled

func (c *Config) IsErrorReportingEnabled() bool

func (*Config) IsFedramp

func (c *Config) IsFedramp() bool

func (*Config) IsProductEnabled

func (c *Config) IsProductEnabled(p product.Product) bool

func (*Config) IsSnykAdvisorEnabled

func (c *Config) IsSnykAdvisorEnabled() bool

func (*Config) IsSnykCodeEnabled

func (c *Config) IsSnykCodeEnabled() bool

func (*Config) IsSnykCodeQualityEnabled

func (c *Config) IsSnykCodeQualityEnabled() bool

func (*Config) IsSnykCodeSecurityEnabled

func (c *Config) IsSnykCodeSecurityEnabled() bool

func (*Config) IsSnykContainerEnabled

func (c *Config) IsSnykContainerEnabled() bool

func (*Config) IsSnykIacEnabled

func (c *Config) IsSnykIacEnabled() bool

func (*Config) IsSnykLearnCodeActionsEnabled

func (c *Config) IsSnykLearnCodeActionsEnabled() bool

func (*Config) IsSnykOSSQuickFixCodeActionsEnabled

func (c *Config) IsSnykOSSQuickFixCodeActionsEnabled() bool

func (*Config) IsSnykOpenBrowserActionEnabled

func (c *Config) IsSnykOpenBrowserActionEnabled() bool

func (*Config) IsSnykOssEnabled

func (c *Config) IsSnykOssEnabled() bool

func (*Config) IsTrustedFolderFeatureEnabled

func (c *Config) IsTrustedFolderFeatureEnabled() bool

func (*Config) Load

func (c *Config) Load()

func (*Config) LoadShellEnvironment

func (c *Config) LoadShellEnvironment()

func (*Config) LogLevel

func (c *Config) LogLevel() string

func (*Config) LogPath

func (c *Config) LogPath() string

func (*Config) Logger

func (c *Config) Logger() *zerolog.Logger

func (*Config) ManageBinariesAutomatically

func (c *Config) ManageBinariesAutomatically() bool

func (*Config) ManageCliBinariesAutomatically

func (c *Config) ManageCliBinariesAutomatically() bool

func (*Config) NonEmptyToken

func (c *Config) NonEmptyToken() bool

func (*Config) Offline

func (c *Config) Offline() bool

func (*Config) Organization

func (c *Config) Organization() string

func (*Config) OsArch

func (c *Config) OsArch() string

func (*Config) OsPlatform

func (c *Config) OsPlatform() string

func (*Config) Path

func (c *Config) Path() string

func (*Config) RuntimeName

func (c *Config) RuntimeName() string

func (*Config) RuntimeVersion

func (c *Config) RuntimeVersion() string

func (*Config) SetAdditionalParameters

func (c *Config) SetAdditionalParameters(path string, parameters []string)

func (*Config) SetAuthenticationMethod

func (c *Config) SetAuthenticationMethod(authMethod types.AuthenticationMethod)

func (*Config) SetAutomaticAuthentication

func (c *Config) SetAutomaticAuthentication(value bool)

func (*Config) SetAutomaticScanning

func (c *Config) SetAutomaticScanning(value bool)

func (*Config) SetCliSettings

func (c *Config) SetCliSettings(settings *CliSettings)

func (*Config) SetClientCapabilities

func (c *Config) SetClientCapabilities(capabilities types.ClientCapabilities)

func (*Config) SetClientProtocolVersion

func (c *Config) SetClientProtocolVersion(requiredProtocolVersion string)

func (*Config) SetConfigFile

func (c *Config) SetConfigFile(configFile string)

func (*Config) SetDeltaFindingsEnabled

func (c *Config) SetDeltaFindingsEnabled(enabled bool)

func (*Config) SetDeviceID

func (c *Config) SetDeviceID(deviceId string)

func (*Config) SetEngine

func (c *Config) SetEngine(engine workflow.Engine)

func (*Config) SetErrorReportingEnabled

func (c *Config) SetErrorReportingEnabled(enabled bool)

func (*Config) SetFormat

func (c *Config) SetFormat(format string)

func (*Config) SetHoverVerbosity

func (c *Config) SetHoverVerbosity(verbosity int)

func (*Config) SetIdeName

func (c *Config) SetIdeName(ideName string)

func (*Config) SetIdeVersion

func (c *Config) SetIdeVersion(ideVersion string)

func (*Config) SetIntegrationName

func (c *Config) SetIntegrationName(integrationName string)

func (*Config) SetIntegrationVersion

func (c *Config) SetIntegrationVersion(integrationVersion string)

func (*Config) SetLogLevel

func (c *Config) SetLogLevel(level string)

func (*Config) SetLogPath

func (c *Config) SetLogPath(logPath string)

func (*Config) SetManageBinariesAutomatically

func (c *Config) SetManageBinariesAutomatically(enabled bool)

func (*Config) SetOffline

func (c *Config) SetOffline(b bool)

func (*Config) SetOrganization

func (c *Config) SetOrganization(organization string)

func (*Config) SetOsArch

func (c *Config) SetOsArch(osArch string)

func (*Config) SetOsPlatform

func (c *Config) SetOsPlatform(osPlatform string)

func (*Config) SetRuntimeName

func (c *Config) SetRuntimeName(runtimeName string)

func (*Config) SetRuntimeVersion

func (c *Config) SetRuntimeVersion(runtimeVersion string)

func (*Config) SetSeverityFilter

func (c *Config) SetSeverityFilter(severityFilter types.SeverityFilter) bool

func (*Config) SetSnykAdvisorEnabled

func (c *Config) SetSnykAdvisorEnabled(enabled bool)

func (*Config) SetSnykCodeApi

func (c *Config) SetSnykCodeApi(snykCodeApiUrl string)

func (*Config) SetSnykCodeEnabled

func (c *Config) SetSnykCodeEnabled(enabled bool)

func (*Config) SetSnykContainerEnabled

func (c *Config) SetSnykContainerEnabled(enabled bool)

func (*Config) SetSnykIacEnabled

func (c *Config) SetSnykIacEnabled(enabled bool)

func (*Config) SetSnykLearnCodeActionsEnabled

func (c *Config) SetSnykLearnCodeActionsEnabled(enabled bool)

func (*Config) SetSnykOSSQuickFixCodeActionsEnabled

func (c *Config) SetSnykOSSQuickFixCodeActionsEnabled(enabled bool)

func (*Config) SetSnykOpenBrowserActionsEnabled

func (c *Config) SetSnykOpenBrowserActionsEnabled(enable bool)

func (*Config) SetSnykOssEnabled

func (c *Config) SetSnykOssEnabled(enabled bool)

func (*Config) SetStorage

func (c *Config) SetStorage(s storage.StorageWithCallbacks)

func (*Config) SetToken

func (c *Config) SetToken(token string)

func (*Config) SetTrustedFolderFeatureEnabled

func (c *Config) SetTrustedFolderFeatureEnabled(enabled bool)

func (*Config) SetTrustedFolders

func (c *Config) SetTrustedFolders(folderPaths []string)

func (*Config) SnykApi

func (c *Config) SnykApi() string

func (*Config) SnykCodeAnalysisTimeout

func (c *Config) SnykCodeAnalysisTimeout() time.Duration

func (*Config) SnykCodeApi

func (c *Config) SnykCodeApi() string

func (*Config) SnykUi

func (c *Config) SnykUi() string

func (*Config) Storage

func (c *Config) Storage() storage.StorageWithCallbacks

func (*Config) Token

func (c *Config) Token() string

func (*Config) TokenAsOAuthToken

func (c *Config) TokenAsOAuthToken() (oauth2.Token, error)

func (*Config) TokenChangesChannel

func (c *Config) TokenChangesChannel() <-chan string

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 (c *Config) TrustedFolders() []string

func (*Config) UpdateApiEndpoints

func (c *Config) UpdateApiEndpoints(snykApiUrl string) bool

Jump to

Keyboard shortcuts

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