Documentation
¶
Index ¶
Constants ¶
View Source
const ( API_URL string = "vulnmap_api" // AKA "endpoint" in the config file AUTHENTICATION_SUBDOMAINS string = "internal_auth_subdomain" // array of additional subdomains to add authentication for AUTHENTICATION_ADDITIONAL_URLS string = "internal_additional_auth_urls" // array of additional urls to add authentication for AUTHENTICATION_TOKEN string = "vulnmap_token" AUTHENTICATION_BEARER_TOKEN string = "vulnmap_oauth_token" INTEGRATION_NAME string = "vulnmap_integration_name" INTEGRATION_VERSION string = "vulnmap_integration_version" INTEGRATION_ENVIRONMENT string = "vulnmap_integration_environment" INTEGRATION_ENVIRONMENT_VERSION string = "vulnmap_integration_environment_version" ANALYTICS_DISABLED string = "vulnmap_disable_analytics" ORGANIZATION string = "org" DEBUG string = "debug" DEBUG_FORMAT string = "debug_format" INSECURE_HTTPS string = "insecure" PROXY_AUTHENTICATION_MECHANISM string = "proxy_auth" CACHE_PATH string = "vulnmap_cache_path" WORKFLOW_USE_STDIO string = "internal_wflstdio" RAW_CMD_ARGS string = "internal_raw_cmd_args" WEB_APP_URL string = "internal_vulnmap_app" INPUT_DIRECTORY string = "targetDirectory" ADD_TRUSTED_CA_FILE string = "internal_additional_trusted_ca_file" // pem file location containing additional CAs to trust FIPS_ENABLED string = "gofips" WORKING_DIRECTORY string = "internal_working_dir" IS_FEDRAMP string = "internal_is_fedramp" UNKNOWN_ARGS string = "internal_unknown_arguments" // arguments unknown to the current application but maybe relevant for delegated application calls // feature flags FF_OAUTH_AUTH_FLOW_ENABLED string = "internal_vulnmap_oauth_enabled" )
Variables ¶
This section is empty.
Functions ¶
func CreateConfigurationFile ¶
CreateConfigurationFile creates a configuration file with the given name.
Types ¶
type Configuration ¶
type Configuration interface { Clone() Configuration Set(key string, value interface{}) Get(key string) interface{} GetAndIsSet(key string) (interface{}, bool) GetString(key string) string GetStringSlice(key string) []string GetBool(key string) bool GetInt(key string) int GetFloat64(key string) float64 GetUrl(key string) *url.URL AddFlagSet(flagset *pflag.FlagSet) error AllKeys() []string AddDefaultValue(key string, defaultValue DefaultValueFunction) AddAlternativeKeys(key string, altKeys []string) GetAlternativeKeys(key string) []string // PersistInStorage ensures that when Set is called with the given key, it will be persisted in the config file. PersistInStorage(key string) SetStorage(storage Storage) GetStorage() Storage }
Configuration is an interface for managing configuration values.
func NewFromFiles ¶
func NewFromFiles(files ...string) Configuration
NewFromFiles creates a new Configuration instance from the given files.
func NewInMemory ¶
func NewInMemory() Configuration
NewInMemory creates a new Configuration instance that is not persisted to disk.
type DefaultValueFunction ¶
type DefaultValueFunction func(existingValue interface{}) interface{}
func StandardDefaultValueFunction ¶
func StandardDefaultValueFunction(defaultValue interface{}) DefaultValueFunction
StandardDefaultValueFunction is a default value function that returns the default value if the existing value is nil.
type EmptyStorage ¶
type EmptyStorage struct{}
type JsonStorage ¶
type JsonStorage struct {
// contains filtered or unexported fields
}
func NewJsonStorage ¶
func NewJsonStorage(path string) *JsonStorage
Click to show internal directories.
Click to hide internal directories.