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) EnableKhulnasoftCodeQuality(activate bool)
- func (c *Config) EnableKhulnasoftCodeSecurity(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) IsAutoScanEnabled() bool
- func (c *Config) IsErrorReportingEnabled() bool
- func (c *Config) IsFedramp() bool
- func (c *Config) IsKhulnasoftAdvisorEnabled() bool
- func (c *Config) IsKhulnasoftCodeEnabled() bool
- func (c *Config) IsKhulnasoftCodeQualityEnabled() bool
- func (c *Config) IsKhulnasoftCodeSecurityEnabled() bool
- func (c *Config) IsKhulnasoftContainerEnabled() bool
- func (c *Config) IsKhulnasoftIacEnabled() bool
- func (c *Config) IsKhulnasoftLearnCodeActionsEnabled() bool
- func (c *Config) IsKhulnasoftOssEnabled() bool
- func (c *Config) IsTelemetryEnabled() bool
- func (c *Config) IsTrustedFolderFeatureEnabled() bool
- func (c *Config) KhulnasoftApi() string
- func (c *Config) KhulnasoftCodeAnalysisTimeout() time.Duration
- func (c *Config) KhulnasoftCodeApi() string
- 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) SetKhulnasoftAdvisorEnabled(enabled bool)
- func (c *Config) SetKhulnasoftCodeApi(khulnasoftCodeApiUrl string)
- func (c *Config) SetKhulnasoftCodeEnabled(enabled bool)
- func (c *Config) SetKhulnasoftContainerEnabled(enabled bool)
- func (c *Config) SetKhulnasoftIacEnabled(enabled bool)
- func (c *Config) SetKhulnasoftLearnCodeActionsEnabled(enabled bool)
- func (c *Config) SetKhulnasoftOssEnabled(enabled bool)
- 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) SetTelemetryEnabled(enabled bool)
- func (c *Config) SetToken(token string)
- func (c *Config) SetTrustedFolderFeatureEnabled(enabled bool)
- func (c *Config) SetTrustedFolders(folderPaths []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(khulnasoftApiUrl string) bool
- type StorageCallbackFunc
- type StorageWithCallbacks
Constants ¶
View Source
const ( ActivateKhulnasoftOssKey = "ACTIVATE_KHULNASOFT_OPEN_SOURCE" ActivateKhulnasoftCodeKey = "ACTIVATE_KHULNASOFT_CODE" ActivateKhulnasoftIacKey = "ACTIVATE_KHULNASOFT_IAC" ActivateKhulnasoftContainerKey = "ACTIVATE_KHULNASOFT_CONTAINER" ActivateKhulnasoftAdvisorKey = "ACTIVATE_KHULNASOFT_ADVISOR" SendErrorReportsKey = "SEND_ERROR_REPORTS" Organization = "KHULNASOFT_CFG_ORG" EnableTelemetry = "KHULNASOFT_CFG_DISABLE_ANALYTICS" )
View Source
const ( FormatHtml = "html" FormatMd = "md" DefaultKhulnasoftApiUrl = "https://khulnasoft.com/api" DefaultDeeproxyApiUrl = "https://deeproxy.khulnasoft.com" )
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) 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) EnableKhulnasoftCodeQuality ¶
func (*Config) EnableKhulnasoftCodeSecurity ¶
func (*Config) FilterSeverity ¶
func (c *Config) FilterSeverity() lsp.SeverityFilter
func (*Config) FindBinaryInDirs ¶
func (*Config) IdeVersion ¶
func (*Config) IntegrationName ¶
func (*Config) IntegrationVersion ¶
func (*Config) IsAutoScanEnabled ¶
func (*Config) IsErrorReportingEnabled ¶
func (*Config) IsKhulnasoftAdvisorEnabled ¶
func (*Config) IsKhulnasoftCodeEnabled ¶
func (*Config) IsKhulnasoftCodeQualityEnabled ¶
func (*Config) IsKhulnasoftCodeSecurityEnabled ¶
func (*Config) IsKhulnasoftContainerEnabled ¶
func (*Config) IsKhulnasoftIacEnabled ¶
func (*Config) IsKhulnasoftLearnCodeActionsEnabled ¶
func (*Config) IsKhulnasoftOssEnabled ¶
func (*Config) IsTelemetryEnabled ¶
func (*Config) IsTrustedFolderFeatureEnabled ¶
func (*Config) KhulnasoftApi ¶
func (*Config) KhulnasoftCodeAnalysisTimeout ¶
func (*Config) KhulnasoftCodeApi ¶
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) SetKhulnasoftAdvisorEnabled ¶
func (*Config) SetKhulnasoftCodeApi ¶
func (*Config) SetKhulnasoftCodeEnabled ¶
func (*Config) SetKhulnasoftContainerEnabled ¶
func (*Config) SetKhulnasoftIacEnabled ¶
func (*Config) SetKhulnasoftLearnCodeActionsEnabled ¶
func (*Config) SetKhulnasoftOssEnabled ¶
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) SetTelemetryEnabled ¶
func (*Config) SetTrustedFolderFeatureEnabled ¶
func (*Config) SetTrustedFolders ¶
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.