mirror of
https://github.com/turbot/steampipe.git
synced 2026-02-18 13:00:10 -05:00
STEAMPIPE_CACHE environment variable resolves to service cache enabled as well as client cache enabled service cache enabled is used by the plugin manager to enable/disable caching on the plugins during startup (runtime toggle is not allowed) - with a max_ttl client cache enabled is used to enable/disable the cache on the database connection (fdw) A TTL can also be set on the client side capped to max_ttl on the server
92 lines
3.1 KiB
Go
92 lines
3.1 KiB
Go
package constants
|
|
|
|
// Argument name constants
|
|
const (
|
|
ArgHelp = "help"
|
|
ArgVersion = "version"
|
|
ArgForce = "force"
|
|
ArgAll = "all"
|
|
ArgTiming = "timing"
|
|
ArgOn = "on"
|
|
ArgOff = "off"
|
|
ArgClear = "clear"
|
|
ArgDatabasePort = "database-port"
|
|
ArgDatabaseQueryTimeout = "query-timeout"
|
|
ArgListenAddress = "database-listen"
|
|
ArgServicePassword = "database-password"
|
|
ArgServiceShowPassword = "show-password"
|
|
ArgDashboard = "dashboard"
|
|
ArgDashboardListen = "dashboard-listen"
|
|
ArgDashboardPort = "dashboard-port"
|
|
ArgForeground = "foreground"
|
|
ArgInvoker = "invoker"
|
|
ArgUpdateCheck = "update-check"
|
|
ArgTelemetry = "telemetry"
|
|
ArgInstallDir = "install-dir"
|
|
ArgWorkspaceChDir = "workspace-chdir"
|
|
ArgWorkspaceDatabase = "workspace-database"
|
|
ArgSchemaComments = "schema-comments"
|
|
ArgCloudHost = "cloud-host"
|
|
ArgCloudToken = "cloud-token"
|
|
ArgSearchPath = "search-path"
|
|
ArgSearchPathPrefix = "search-path-prefix"
|
|
ArgWatch = "watch"
|
|
ArgTheme = "theme"
|
|
ArgProgress = "progress"
|
|
ArgExport = "export"
|
|
ArgMaxParallel = "max-parallel"
|
|
ArgLogLevel = "log-level"
|
|
ArgDryRun = "dry-run"
|
|
ArgWhere = "where"
|
|
ArgTag = "tag"
|
|
ArgVariable = "var"
|
|
ArgVarFile = "var-file"
|
|
ArgConnectionString = "connection-string"
|
|
ArgCheckDisplayWidth = "check-display-width"
|
|
ArgPrune = "prune"
|
|
ArgModInstall = "mod-install"
|
|
ArgServiceMode = "service-mode"
|
|
ArgBrowser = "browser"
|
|
ArgInput = "input"
|
|
ArgDashboardInput = "dashboard-input"
|
|
ArgMaxCacheSizeMb = "max-cache-size-mb"
|
|
ArgCacheTtl = "cache-ttl"
|
|
ArgClientCacheEnabled = "client-cache-enabled"
|
|
ArgServiceCacheEnabled = "service-cache-enabled"
|
|
ArgCacheMaxTtl = "cache-max-ttl"
|
|
ArgIntrospection = "introspection"
|
|
ArgShare = "share"
|
|
ArgSnapshot = "snapshot"
|
|
ArgSnapshotTag = "snapshot-tag"
|
|
ArgWorkspaceProfile = "workspace"
|
|
ArgModLocation = "mod-location"
|
|
ArgSnapshotLocation = "snapshot-location"
|
|
ArgSnapshotTitle = "snapshot-title"
|
|
ArgDatabaseStartTimeout = "database-start-timeout"
|
|
)
|
|
|
|
// metaquery mode arguments
|
|
|
|
var ArgOutput = ArgFromMetaquery(CmdOutput)
|
|
var ArgSeparator = ArgFromMetaquery(CmdSeparator)
|
|
var ArgHeader = ArgFromMetaquery(CmdHeaders)
|
|
var ArgMultiLine = ArgFromMetaquery(CmdMulti)
|
|
var ArgAutoComplete = ArgFromMetaquery(CmdAutoComplete)
|
|
|
|
// BoolToOnOff converts a boolean value onto the string "on" or "off"
|
|
func BoolToOnOff(val bool) string {
|
|
if val {
|
|
return ArgOn
|
|
}
|
|
return ArgOff
|
|
}
|
|
|
|
// BoolToEnableDisable converts a boolean value onto the string "enable" or "disable"
|
|
func BoolToEnableDisable(val bool) string {
|
|
if val {
|
|
return "enable"
|
|
}
|
|
return "disable"
|
|
|
|
}
|