Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( CustomerID = "{{CUSTOMER_ID}}" APIEndpoint = "{{API_ENDPOINT}}" APIKey = "{{API_KEY}}" ScanFrequencyHours = "{{SCAN_FREQUENCY_HOURS}}" SearchDirs []string EnableNPMScan *bool // nil=auto ColorMode string // "" means auto OutputFormat string // "" means default (pretty) HTMLOutputFile string // "" means not set Quiet *bool // nil=default behavior )
Default placeholders (replaced by backend for enterprise installation scripts).
Functions ¶
func ConfigFilePath ¶
func ConfigFilePath() string
ConfigFilePath returns the path to the config file.
func IsEnterpriseMode ¶
func IsEnterpriseMode() bool
IsEnterpriseMode returns true if valid enterprise credentials are configured.
func Load ¶
func Load()
Load reads the config file and applies values to the package-level variables. Values already set (not placeholders) are not overridden — build-time values take precedence.
func RunConfigure ¶
func RunConfigure() error
RunConfigure interactively prompts for config values and saves to the config file.
Types ¶
type ConfigFile ¶
type ConfigFile struct {
CustomerID string `json:"customer_id,omitempty"`
APIEndpoint string `json:"api_endpoint,omitempty"`
APIKey string `json:"api_key,omitempty"`
ScanFrequencyHours string `json:"scan_frequency_hours,omitempty"`
SearchDirs []string `json:"search_dirs,omitempty"`
EnableNPMScan *bool `json:"enable_npm_scan,omitempty"`
ColorMode string `json:"color_mode,omitempty"`
OutputFormat string `json:"output_format,omitempty"`
HTMLOutputFile string `json:"html_output_file,omitempty"`
Quiet *bool `json:"quiet,omitempty"`
}
ConfigFile is the JSON structure persisted to ~/.stepsecurity/config.json.