Documentation ¶
Index ¶
- Constants
- Variables
- func BoldBlack(arg interface{}) aurora.Value
- func BoldBlue(arg interface{}) aurora.Value
- func BoldBrightBlack(arg interface{}) aurora.Value
- func BoldBrightBlue(arg interface{}) aurora.Value
- func BoldBrightCyan(arg interface{}) aurora.Value
- func BoldBrightGreen(arg interface{}) aurora.Value
- func BoldBrightMagenta(arg interface{}) aurora.Value
- func BoldBrightRed(arg interface{}) aurora.Value
- func BoldBrightWhite(arg interface{}) aurora.Value
- func BoldBrightYellow(arg interface{}) aurora.Value
- func BoldCyan(arg interface{}) aurora.Value
- func BoldGreen(arg interface{}) aurora.Value
- func BoldMagenta(arg interface{}) aurora.Value
- func BoldRed(arg interface{}) aurora.Value
- func BoldWhite(arg interface{}) aurora.Value
- func BoldYellow(arg interface{}) aurora.Value
- func BoolToEnableDisable(val bool) string
- func BoolToOnOff(val bool) string
- func DashboardAssetsImageRef() string
- func FlagValues[T comparable](mappings map[T][]string) []string
- func Gray1(arg interface{}) aurora.Value
- func Gray2(arg interface{}) aurora.Value
- func Gray3(arg interface{}) aurora.Value
- func Gray4(arg interface{}) aurora.Value
- func Gray5(arg interface{}) aurora.Value
- func IsValidInputStyleType(s string) bool
- func IsValidInputType(s string) bool
- func IsValidSmtpTls(s string) bool
- func IsYamlExtension(ext string) bool
- type ModUpdateStrategy
Constants ¶
const ( ArgArg = "arg" ArgBenchmarkTimeout = "benchmark-timeout" ArgAutoComplete = "auto-complete" ArgCacheMaxTtl = "cache-max-ttl" ArgCacheTtl = "cache-ttl" ArgClientCacheEnabled = "client-cache-enabled" ArgDashboardStartTimeout = "dashboard-start-timeout" ArgDatabaseListenAddresses = "database-listen" ArgDatabasePort = "database-port" ArgDashboardTimeout = "dashboard-timeout" ArgDatabaseQueryTimeout = "query-timeout" ArgDatabaseStartTimeout = "database-start-timeout" ArgDetach = "detach" ArgDisplayWidth = "display-width" ArgDryRun = "dry-run" ArgEnvironment = "environment" ArgExport = "export" ArgEventStore = "event-store" ArgForce = "force" ArgHeader = "header" ArgHelp = "help" ArgHost = "host" ArgInput = "input" ArgInsecure = "insecure" ArgInstallDir = "install-dir" ArgIntrospection = "introspection" ArgListen = "listen" ArgLogLevel = "log-level" ArgMaxCacheSizeMb = "max-cache-size-mb" ArgMaxParallel = "max-parallel" ArgMemoryMaxMb = "memory-max-mb" ArgMemoryMaxMbPlugin = "memory-max-mb-plugin" ArgModInstall = "mod-install" ArgModLocation = "mod-location" ArgMultiLine = "multi-line" ArgOff = "off" ArgOn = "on" ArgOutput = "output" ArgPipesInstallDir = "pipes-install-dir" ArgPipesHost = "pipes-host" ArgPipesToken = "pipes-token" ArgPort = "port" ArgProgress = "progress" ArgPrune = "prune" ArgPull = "pull" ArgSearchPath = "search-path" ArgSearchPathPrefix = "search-path-prefix" ArgSeparator = "separator" ArgServiceCacheEnabled = "service-cache-enabled" ArgSnapshot = "snapshot" ArgSnapshotLocation = "snapshot-location" ArgSnapshotTag = "snapshot-tag" ArgSnapshotTitle = "snapshot-title" ArgTag = "tag" ArgTelemetry = "telemetry" ArgTiming = "timing" ArgUpdateCheck = "update-check" ArgVarFile = "var-file" ArgVariable = "var" ArgVerbose = "verbose" ArgWatch = "watch" ArgWhere = "where" ArgDatabase = "database" ArgWorkspaceProfile = "workspace" ArgConfigPath = "config-path" ArgBaseUrl = "base-url" ArgExecutionId = "execution-id" // Flowpipe concurrency ArgMaxConcurrencyHttp = "max-concurrency-http" ArgMaxConcurrencyQuery = "max-concurrency-query" ArgMaxConcurrencyContainer = "max-concurrency-container" ArgMaxConcurrencyFunction = "max-concurrency-function" ArgProcessRetention = "process-retention" )
Argument name constants
const ( DuckDBBackendName = "DuckDB" MySQLBackendName = "MySQL" PostgresBackendName = "PostgreSQL" SQLiteBackendName = "SQLite" SteampipeBackendName = "Steampipe" )
const ( DefaultPipesHost = "pipes.turbot.com" LegacyDefaultPipesHost = "cloud.steampipe.io" )
const ( CmdNameQuery = "query" CmdNameCheck = "check" CmdNameDashboard = "dashboard" )
const ( ConfigKeyInteractive = "interactive" ConfigKeyActiveCommand = "cmd" ConfigKeyActiveCommandArgs = "cmd_args" ConfigInteractiveVariables = "interactive_var" ConfigKeyIsTerminalTTY = "is_terminal" ConfigKeyServerSearchPath = "server-search-path" ConfigKeyServerSearchPathPrefix = "server-search-path-prefix" ConfigKeyBypassHomeDirModfileWarning = "bypass-home-dir-modfile-warning" //nolint: gosec // not credentials )
viper config keys
const ( // ControlQueryCancellationTimeoutSecs is maximum number of seconds to wait for control queries to finish cancelling ControlQueryCancellationTimeoutSecs = 30 // MaxControlRunAttempts determines how many time should a cotnrol run should be retried // in the case of a GRPC connectivity error MaxControlRunAttempts = 2 )
const ( ControlOk = "ok" ControlAlarm = "alarm" ControlSkip = "skip" ControlInfo = "info" ControlError = "error" )
const ( DashboardServerDefaultPort = 9194 DashboardAssetsImageRefFormat = "us-docker.pkg.dev/steampipe/steampipe/assets:%s" )
const ( DefaultMaxConnections = 10 ConnectionStatePending = "pending" ConnectionStatePendingIncomplete = "incomplete" ConnectionStateReady = "ready" ConnectionStateUpdating = "updating" ConnectionStateDeleting = "deleting" ConnectionStateDisabled = "disabled" ConnectionStateError = "error" )
const ( // SpinnerShowTimeout is the duration after which spinner should be shown SpinnerShowTimeout = 1 * time.Second MaxColumnWidth = 1024 // NullString is the string which is displayed for null column values NullString = "<null>" )
Display constants
const ( EnvPipesHost = "PIPES_HOST" EnvPipesToken = "PIPES_TOKEN" EnvPipesInstallDir = "PIPES_INSTALL_DIR" )
Environment Variables
const ( LogLevelTrace = slog.Level(-8) LogLevelOff = slog.Level(-16) )
const ( // A consistent detail message for all "not a valid identifier" diagnostics. BadIdentifierDetail = "A name must start with a letter or underscore and may contain only letters, digits, underscores, and dashes." BadDependsOn = "Invalid depends_on" )
const ( ExitCodeSuccessful = 0 ExitCodeControlsAlarm = 1 // check - no runtime errors, 1 or more control alarms, no control errors ExitCodeControlsError = 2 // check - no runtime errors, 1 or more control errors ExitCodePluginLoadingError = 11 // plugin - loading error ExitCodePluginListFailure = 12 // plugin - listing failed ExitCodePluginNotFound = 13 // plugin - not found ExitCodePluginInstallFailure = 14 // plugin - install failed ExitCodeSnapshotCreationFailed = 21 // snapshot - creation failed ExitCodeSnapshotUploadFailed = 22 // snapshot - upload failed ExitCodeServiceSetupFailure = 31 // service - setup failed ExitCodeServiceStartupFailure = 32 // service - start failed ExitCodeServiceStopFailure = 33 // service - stop failed ExitCodeQueryExecutionFailed = 41 // query - 1 or more queries failed - change in behavior(previously the exitCode used to be the number of queries that failed) ExitCodeLoginCloudConnectionFailed = 51 // login - connecting to cloud failed ExitCodeModInitFailed = 61 // mod - init failed ExitCodeModInstallFailed = 62 // mod - install failed ExitCodeInvalidExecutionEnvironment = 249 // common - when steampipe is run in an unsupported environment ExitCodeInitializationFailed = 250 // common - initialization failed ExitCodeNoModFile = 252 // common - no mod file ExitCodeFileSystemAccessFailure = 253 // common - file system access failed ExitCodeInsufficientOrWrongInputs = 254 // common - runtime error(insufficient or wrong input) ExitCodeUnknownErrorPanic = 255 // common - runtime error(unknown panic) )
const ( PluginExtension = ".plugin" SqlExtension = ".sql" MarkdownExtension = ".md" JsonExtension = ".json" CsvExtension = ".csv" TextExtension = ".txt" SnapshotExtension = ".pps" TokenExtension = ".tptt" PipelineExtension = ".fp" )
Original Steampipe values
const ( ModUpdateFull = "full" ModUpdateLatest = "latest" ModUpdateDevelopment = "development" ModUpdateMinimal = "minimal" )
const ( InputTypeButton = "button" InputTypeMultiSelect = "multiselect" InputTypeSelect = "select" InputTypeText = "text" )
const ( InputStyleInfo = "info" InputStyleOk = "ok" InputStyleAlert = "alert" InputStyleDefault = "default" )
const ( IntrospectionNone = "none" IntrospectionInfo = "info" IntrospectionControl = "control" )
constants for introspection config flag
const ( OutputFormatCSV = "csv" OutputFormatHTML = "html" OutputFormatMD = "md" OutputFormatJSON = "json" OutputFormatTable = "table" OutputFormatLine = "line" OutputFormatNone = "none" OutputFormatText = "text" OutputFormatBrief = "brief" OutputFormatSnapshot = "snapshot" OutputFormatSnapshotShort = "pps" OutputFormatPretty = "pretty" OutputFormatPlain = "plain" OutputFormatYAML = "yaml" )
const ( ArchAMD64 = "amd64" ArchARM64 = "arm64" OSLinux = "linux" OSDarwin = "darwin" )
const ( SmtpTlsRequired = "required" SmtpTlsOff = "off" SmtpTlsAuto = "auto" )
const ( TelemetryNone = "none" TelemetryInfo = "info" )
constants for telemetry config flag
const DefaultFlowpipeWorkspaceContent = `` /* 705-byte string literal not displayed */
const DefaultMaxCacheSizeMb = 16384
const DefaultPowerpipeWorkspaceContent = `` /* 1233-byte string literal not displayed */
DefaultPowerpipeWorkspaceContent is the content of the sample workspaces config file(workspaces.spc.sample), that is created if it does not exist
const (
PostgresNotificationChannel = "steampipe_notification"
)
const SteampipeHubOCIBase = "hub.steampipe.io/"
Variables ¶
var ( // OptLeftArrowASCIICode :: OptLeftArrowASCIICode = []byte{0x1b, 0x62} // OptRightArrowASCIICode :: OptRightArrowASCIICode = []byte{0x1b, 0x66} // AltLeftArrowASCIICode :: AltLeftArrowASCIICode = []byte{0x1b, 0x1b, 0x5B, 0x44} // AltRightArrowASCIICode :: AltRightArrowASCIICode = []byte{0x1b, 0x1b, 0x5B, 0x43} )
var ( ColoredErr = color.RedString("Error") ColoredWarn = color.YellowString("Warning") )
var ( DashboardServiceStartTimeout = 30 * time.Second DBStartTimeout = 30 * time.Second DBConnectionRetryBackoff = 200 * time.Millisecond DBRecoveryTimeout = 24 * time.Hour DBRecoveryRetryBackoff = 200 * time.Millisecond ServicePingInterval = 50 * time.Millisecond )
var Black = aurora.Black
var Blink = aurora.Blink
var Blue = aurora.Blue
var Bold = aurora.Bold
var BrightBlack = aurora.BrightBlack
var BrightBlue = aurora.BrightBlue
var BrightCyan = aurora.BrightCyan
var BrightGreen = aurora.BrightGreen
var BrightMagenta = aurora.BrightMagenta
var BrightRed = aurora.BrightRed
var BrightWhite = aurora.BrightWhite
var BrightYellow = aurora.BrightYellow
var Colors = map[string]func(arg interface{}) aurora.Value{ "bold": Bold, "italic": Italic, "underline": Underline, "slow-blink": SlowBlink, "black": Black, "red": Red, "green": Green, "yellow": Yellow, "blue": Blue, "magenta": Magenta, "cyan": Cyan, "white": White, "bold-black": BoldBlack, "bold-red": BoldRed, "bold-green": BoldGreen, "bold-yellow": BoldYellow, "bold-blue": BoldBlue, "bold-magenta": BoldMagenta, "bold-cyan": BoldCyan, "bold-white": BoldWhite, "bright-black": BrightBlack, "bright-red": BrightRed, "bright-green": BrightGreen, "bright-yellow": BrightYellow, "bright-blue": BrightBlue, "bright-magenta": BrightMagenta, "bright-cyan": BrightCyan, "bright-white": BrightWhite, "bold-bright-black": BoldBrightBlack, "bold-bright-red": BoldBrightRed, "bold-bright-green": BoldBrightGreen, "bold-bright-yellow": BoldBrightYellow, "bold-bright-blue": BoldBrightBlue, "bold-bright-magenta": BoldBrightMagenta, "bold-bright-cyan": BoldBrightCyan, "bold-bright-white": BoldBrightWhite, "gray1": Gray1, "gray2": Gray2, "gray3": Gray3, "gray4": Gray4, "gray5": Gray5, }
Colors is a map of string to aurora colour value
var ConnectionStates = []string{ ConnectionStatePending, ConnectionStateReady, ConnectionStateUpdating, ConnectionStateDeleting, ConnectionStateError, }
ConnectionStates is a handy array of all states
var Cyan = aurora.Cyan
var DashboardListenAddresses = []string{"localhost", "127.0.0.1"}
DashboardListenAddresses is an arrays is listen addresses which Steampipe accepts
var Green = aurora.Green
var Italic = aurora.Italic
var Magenta = aurora.Magenta
var ModUpdateStrategyIds = map[ModUpdateStrategy][]string{ ModUpdateIdFull: {ModUpdateFull}, ModUpdateIdLatest: {ModUpdateLatest}, ModUpdateIdDevelopment: {ModUpdateDevelopment}, ModUpdateIdMinimal: {ModUpdateMinimal}, }
var Red = aurora.Red
var SlowBlink = aurora.SlowBlink
var TelemetryLevels = []string{TelemetryNone, TelemetryInfo}
var Underline = aurora.Underline
var White = aurora.White
var YamlExtensions = []string{".yml", ".yaml"}
var Yellow = aurora.Yellow
Functions ¶
func BoldBrightBlack ¶
func BoldBrightBlue ¶
func BoldBrightCyan ¶
func BoldBrightGreen ¶
func BoldBrightMagenta ¶
func BoldBrightRed ¶
func BoldBrightWhite ¶
func BoldBrightYellow ¶
func BoldMagenta ¶
func BoldYellow ¶
func BoolToEnableDisable ¶
BoolToEnableDisable converts a boolean value onto the string "enable" or "disable"
func BoolToOnOff ¶
BoolToOnOff converts a boolean value onto the string "on" or "off"
func DashboardAssetsImageRef ¶
func DashboardAssetsImageRef() string
func FlagValues ¶ added in v1.3.0
func FlagValues[T comparable](mappings map[T][]string) []string
func IsValidInputStyleType ¶ added in v0.3.0
func IsValidInputType ¶ added in v0.3.0
func IsValidSmtpTls ¶ added in v0.3.0
func IsYamlExtension ¶
Types ¶
type ModUpdateStrategy ¶ added in v1.3.0
type ModUpdateStrategy int
ModUpdateStrategy controls how mods are updated. It is one of: 1. full - check everything for both latest and accuracy 2. latest - update everything to latest, but only branches - not tags - are commit checked (which is the same as latest) 3. development - update branches and broken constraints to latest, leave satisfied constraints unchanged 4. minimal - only update broken constraints, do not check branches for new commits
const ( ModUpdateIdFull ModUpdateStrategy = iota // default for command ModUpdateIdLatest ModUpdateIdDevelopment ModUpdateIdMinimal )
Source Files ¶
- args.go
- ascii.go
- backend.go
- cache.go
- cloud.go
- cmd_name.go
- colors.go
- config_keys.go
- control_execute.go
- control_status.go
- dashboard.go
- db.go
- default_workspaces.go
- display.go
- duration.go
- env.go
- errors.go
- exit_codes.go
- extensions.go
- flags.go
- input_type.go
- introspection.go
- notifications.go
- output_format.go
- platform.go
- plugin.go
- smtp_tls.go
- telemetry.go