Documentation ¶
Index ¶
- func NewDefaultWorkspaceProfile[T WorkspaceProfile]() (T, hcl.Diagnostics)
- func NewWorkspaceProfile[T WorkspaceProfile](block *hcl.Block) (T, hcl.Diagnostics)
- type ConfigMap
- func (m ConfigMap) PopulateConfigMapForOptions(o options.Options)
- func (m ConfigMap) SetBoolItem(argValue *bool, argName string)
- func (m ConfigMap) SetIntItem(argValue *int, argName string)
- func (m ConfigMap) SetStringItem(argValue *string, argName string)
- func (m ConfigMap) SetStringSliceItem(argValue []string, argName string)
- type FlowpipeWorkspaceProfile
- func (p *FlowpipeWorkspaceProfile) ConfigMap(cmd *cobra.Command) map[string]interface{}
- func (p *FlowpipeWorkspaceProfile) CtyValue() (cty.Value, error)
- func (p *FlowpipeWorkspaceProfile) GetDeclRange() *hcl.Range
- func (p *FlowpipeWorkspaceProfile) GetInstallDir() *string
- func (p *FlowpipeWorkspaceProfile) GetOptionsForBlock(block *hcl.Block) (options.Options, hcl.Diagnostics)
- func (p *FlowpipeWorkspaceProfile) IsNil() bool
- func (p *FlowpipeWorkspaceProfile) Name() string
- func (p *FlowpipeWorkspaceProfile) OnDecoded() hcl.Diagnostics
- func (p *FlowpipeWorkspaceProfile) SetOptions(opts options.Options, block *hcl.Block) hcl.Diagnostics
- func (p *FlowpipeWorkspaceProfile) ShortName() string
- type PowerpipeWorkspaceProfile
- func (p *PowerpipeWorkspaceProfile) ConfigMap(cmd *cobra.Command) map[string]interface{}
- func (p *PowerpipeWorkspaceProfile) CtyValue() (cty.Value, error)
- func (p *PowerpipeWorkspaceProfile) GetDeclRange() *hcl.Range
- func (p *PowerpipeWorkspaceProfile) GetInstallDir() *string
- func (p *PowerpipeWorkspaceProfile) GetOptionsForBlock(block *hcl.Block) (options.Options, hcl.Diagnostics)
- func (p *PowerpipeWorkspaceProfile) GetPipesMetadata() (*steampipeconfig.PipesMetadata, error_helpers.ErrorAndWarnings)
- func (p *PowerpipeWorkspaceProfile) IsCloudWorkspace() bool
- func (p *PowerpipeWorkspaceProfile) IsNil() bool
- func (p *PowerpipeWorkspaceProfile) Name() string
- func (p *PowerpipeWorkspaceProfile) OnDecoded() hcl.Diagnostics
- func (p *PowerpipeWorkspaceProfile) SetOptions(opts options.Options, block *hcl.Block) hcl.Diagnostics
- func (p *PowerpipeWorkspaceProfile) ShortName() string
- type SteampipeWorkspaceProfile
- func (p *SteampipeWorkspaceProfile) ConfigMap(cmd *cobra.Command) map[string]interface{}
- func (p *SteampipeWorkspaceProfile) CtyValue() (cty.Value, error)
- func (p *SteampipeWorkspaceProfile) GetDeclRange() *hcl.Range
- func (p *SteampipeWorkspaceProfile) GetInstallDir() *string
- func (p *SteampipeWorkspaceProfile) GetOptionsForBlock(block *hcl.Block) (options.Options, hcl.Diagnostics)
- func (p *SteampipeWorkspaceProfile) IsNil() bool
- func (p *SteampipeWorkspaceProfile) Name() string
- func (p *SteampipeWorkspaceProfile) OnDecoded() hcl.Diagnostics
- func (p *SteampipeWorkspaceProfile) SetOptions(opts options.Options, block *hcl.Block) hcl.Diagnostics
- func (p *SteampipeWorkspaceProfile) ShortName() string
- type WorkspaceProfile
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDefaultWorkspaceProfile ¶
func NewDefaultWorkspaceProfile[T WorkspaceProfile]() (T, hcl.Diagnostics)
func NewWorkspaceProfile ¶
func NewWorkspaceProfile[T WorkspaceProfile](block *hcl.Block) (T, hcl.Diagnostics)
Types ¶
type ConfigMap ¶
type ConfigMap map[string]interface{}
func (ConfigMap) PopulateConfigMapForOptions ¶
PopulateConfigMapForOptions populates the config map for a given options object NOTE: this mutates configMap
func (ConfigMap) SetBoolItem ¶
SetBoolItem checks is bool pointer is non-nil and if so, add to map with given key
func (ConfigMap) SetIntItem ¶
SetIntItem checks is int pointer is non-nil and if so, add to map with given key
func (ConfigMap) SetStringItem ¶
SetStringItem checks is string pointer is non-nil and if so, add to map with given key
func (ConfigMap) SetStringSliceItem ¶
SetStringSliceItem checks is string slice pointer is non-nil and if so, add to map with given key
type FlowpipeWorkspaceProfile ¶
type FlowpipeWorkspaceProfile struct { ProfileName string `hcl:"name,label" cty:"name"` Base *FlowpipeWorkspaceProfile `hcl:"base"` Host *string `hcl:"host" cty:"host"` Input *bool `hcl:"input" cty:"input"` Insecure *bool `hcl:"insecure" cty:"insecure"` Listen *string `hcl:"listen" cty:"port"` LogLevel *string `hcl:"log_level" cty:"log_level"` MemoryMaxMb *int `hcl:"memory_max_mb" cty:"memory_max_mb"` Output *string `hcl:"output" cty:"output"` Port *int `hcl:"port" cty:"port"` Progress *bool `hcl:"progress" cty:"progress"` Telemetry *string `hcl:"telemetry" cty:"telemetry"` UpdateCheck *string `hcl:"update_check" cty:"update_check"` Watch *bool `hcl:"watch" cty:"watch"` MaxConcurrencyHttp *int `hcl:"max_concurrency_http" cty:"max_concurrency_http"` MaxConcurrencyContainer *int `hcl:"max_concurrency_container" cty:"max_concurrency_container"` MaxConcurrencyFunction *int `hcl:"max_concurrency_function" cty:"max_concurrency_function"` MaxConcurrencyQuery *int `hcl:"max_concurrency_query" cty:"max_concurrency_query"` ProcessRetention *int `hcl:"process_retention" cty:"process_retention"` BaseUrl *string `hcl:"base_url" cty:"base_url"` DeclRange hcl.Range }
func (*FlowpipeWorkspaceProfile) ConfigMap ¶
func (p *FlowpipeWorkspaceProfile) ConfigMap(cmd *cobra.Command) map[string]interface{}
ConfigMap creates a config map containing all options to pass to viper
func (*FlowpipeWorkspaceProfile) CtyValue ¶
func (p *FlowpipeWorkspaceProfile) CtyValue() (cty.Value, error)
func (*FlowpipeWorkspaceProfile) GetDeclRange ¶
func (p *FlowpipeWorkspaceProfile) GetDeclRange() *hcl.Range
func (*FlowpipeWorkspaceProfile) GetInstallDir ¶
func (p *FlowpipeWorkspaceProfile) GetInstallDir() *string
TODO this is (currently) required by interface
func (*FlowpipeWorkspaceProfile) GetOptionsForBlock ¶
func (p *FlowpipeWorkspaceProfile) GetOptionsForBlock(block *hcl.Block) (options.Options, hcl.Diagnostics)
func (*FlowpipeWorkspaceProfile) IsNil ¶
func (p *FlowpipeWorkspaceProfile) IsNil() bool
func (*FlowpipeWorkspaceProfile) Name ¶
func (p *FlowpipeWorkspaceProfile) Name() string
func (*FlowpipeWorkspaceProfile) OnDecoded ¶
func (p *FlowpipeWorkspaceProfile) OnDecoded() hcl.Diagnostics
func (*FlowpipeWorkspaceProfile) SetOptions ¶
func (p *FlowpipeWorkspaceProfile) SetOptions(opts options.Options, block *hcl.Block) hcl.Diagnostics
SetOptions sets the options on the Workspace FlowpipeWorkspaceProfile does not support options
func (*FlowpipeWorkspaceProfile) ShortName ¶
func (p *FlowpipeWorkspaceProfile) ShortName() string
type PowerpipeWorkspaceProfile ¶
type PowerpipeWorkspaceProfile struct { ProfileName string `hcl:"name,label" cty:"name"` // dashboard / api server options Host *string `hcl:"string" cty:"string"` Port *int `hcl:"port" cty:"port"` Listen *string `hcl:"listen" cty:"port"` // general options UpdateCheck *string `hcl:"update_check" cty:"update_check"` Telemetry *string `hcl:"telemetry" cty:"telemetry"` LogLevel *string `hcl:"log_level" cty:"log_level"` MemoryMaxMb *int `hcl:"memory_max_mb" cty:"memory_max_mb"` // execution timeouts BenchmarkTimeout *int `hcl:"benchmark_timeout" cty:"benchmark_timeout"` DashboardTimeout *int `hcl:"dashboard_timeout" cty:"dashboard_timeout"` // pipes integration options PipesHost *string `hcl:"pipes_host,optional" cty:"pipes_host"` PipesToken *string `hcl:"pipes_token,optional" cty:"pipes_token"` SnapshotLocation *string `hcl:"snapshot_location,optional" cty:"snapshot_location"` ModLocation *string `hcl:"mod_location,optional" cty:"mod_location"` Watch *bool `hcl:"watch" cty:"watch"` Input *bool `hcl:"input" cty:"input"` Progress *bool `hcl:"progress" cty:"progress"` // "default" db settings Database *string `hcl:"database" cty:"database"` // deprecated QueryTimeout *int `hcl:"query_timeout,optional" cty:"query_timeout"` MaxParallel *int `hcl:"max_parallel" cty:"max-parallel"` // (postgres-specific) search path settings SearchPath *string `hcl:"search_path" cty:"search_path"` SearchPathPrefix *string `hcl:"search_path_prefix" cty:"search_path_prefix"` // terminal options Header *bool `hcl:"header" cty:"header"` Output *string `hcl:"output"` Separator *string `hcl:"separator"` Timing *bool `hcl:"timing"` // set if this is an implicit profile for a cloud workspace CloudWorkspace *string `hcl:"-"` Base *PowerpipeWorkspaceProfile `hcl:"base"` DeclRange hcl.Range }
func (*PowerpipeWorkspaceProfile) ConfigMap ¶
func (p *PowerpipeWorkspaceProfile) ConfigMap(cmd *cobra.Command) map[string]interface{}
ConfigMap creates a config map containing all options to pass to viper
func (*PowerpipeWorkspaceProfile) CtyValue ¶
func (p *PowerpipeWorkspaceProfile) CtyValue() (cty.Value, error)
func (*PowerpipeWorkspaceProfile) GetDeclRange ¶
func (p *PowerpipeWorkspaceProfile) GetDeclRange() *hcl.Range
func (*PowerpipeWorkspaceProfile) GetInstallDir ¶
func (p *PowerpipeWorkspaceProfile) GetInstallDir() *string
func (*PowerpipeWorkspaceProfile) GetOptionsForBlock ¶
func (p *PowerpipeWorkspaceProfile) GetOptionsForBlock(block *hcl.Block) (options.Options, hcl.Diagnostics)
func (*PowerpipeWorkspaceProfile) GetPipesMetadata ¶
func (p *PowerpipeWorkspaceProfile) GetPipesMetadata() (*steampipeconfig.PipesMetadata, error_helpers.ErrorAndWarnings)
GetPipesMetadata returns the cloud metadata for the cloud workspace note: call IsCloudWorkspace before calling this to ensure it is a cloud workspace
func (*PowerpipeWorkspaceProfile) IsCloudWorkspace ¶
func (p *PowerpipeWorkspaceProfile) IsCloudWorkspace() bool
func (*PowerpipeWorkspaceProfile) IsNil ¶
func (p *PowerpipeWorkspaceProfile) IsNil() bool
func (*PowerpipeWorkspaceProfile) Name ¶
func (p *PowerpipeWorkspaceProfile) Name() string
func (*PowerpipeWorkspaceProfile) OnDecoded ¶
func (p *PowerpipeWorkspaceProfile) OnDecoded() hcl.Diagnostics
func (*PowerpipeWorkspaceProfile) SetOptions ¶
func (p *PowerpipeWorkspaceProfile) SetOptions(opts options.Options, block *hcl.Block) hcl.Diagnostics
SetOptions sets the options on the connection PowerpipeWorkspaceProfile does not support options
func (*PowerpipeWorkspaceProfile) ShortName ¶
func (p *PowerpipeWorkspaceProfile) ShortName() string
type SteampipeWorkspaceProfile ¶
type SteampipeWorkspaceProfile struct { ProfileName string `hcl:"name,label" cty:"name"` PipesHost *string `hcl:"pipes_host,optional" cty:"pipes_host"` PipesToken *string `hcl:"pipes_token,optional" cty:"pipes_token"` InstallDir *string `hcl:"install_dir,optional" cty:"install_dir"` QueryTimeout *int `hcl:"query_timeout,optional" cty:"query_timeout"` SnapshotLocation *string `hcl:"snapshot_location,optional" cty:"snapshot_location"` WorkspaceDatabase *string `hcl:"workspace_database,optional" cty:"workspace_database"` SearchPath *string `hcl:"search_path" cty:"search_path"` SearchPathPrefix *string `hcl:"search_path_prefix" cty:"search_path_prefix"` MaxParallel *int `hcl:"max_parallel" cty:"max-parallel"` Input *bool `hcl:"input" cty:"input"` Progress *bool `hcl:"progress" cty:"progress"` Theme *string `hcl:"theme" cty:"theme"` Cache *bool `hcl:"cache" cty:"cache"` CacheTTL *int `hcl:"cache_ttl" cty:"cache_ttl"` Base *SteampipeWorkspaceProfile `hcl:"base"` // options QueryOptions *options.Query `cty:"query-options"` DeclRange hcl.Range // no longer supported, exists here only to avoid errors (remove in future steampipe release) CloudHost *string `hcl:"cloud_host,optional" cty:"cloud_host"` CloudToken *string `hcl:"cloud_token,optional" cty:"cloud_token"` ModLocation *string `hcl:"mod_location,optional" cty:"mod_location"` Watch *bool `hcl:"watch" cty:"watch"` Introspection *string `hcl:"introspection" cty:"introspection"` CheckOptions *options.Check `cty:"check-options"` DashboardOptions *options.Dashboard `cty:"dashboard-options"` // contains filtered or unexported fields }
func NewSteampipeWorkspaceProfile ¶
func NewSteampipeWorkspaceProfile(block *hcl.Block) *SteampipeWorkspaceProfile
func (*SteampipeWorkspaceProfile) ConfigMap ¶
func (p *SteampipeWorkspaceProfile) ConfigMap(cmd *cobra.Command) map[string]interface{}
ConfigMap creates a config map containing all options to pass to viper
func (*SteampipeWorkspaceProfile) CtyValue ¶
func (p *SteampipeWorkspaceProfile) CtyValue() (cty.Value, error)
func (*SteampipeWorkspaceProfile) GetDeclRange ¶
func (p *SteampipeWorkspaceProfile) GetDeclRange() *hcl.Range
func (*SteampipeWorkspaceProfile) GetInstallDir ¶
func (p *SteampipeWorkspaceProfile) GetInstallDir() *string
func (*SteampipeWorkspaceProfile) GetOptionsForBlock ¶
func (p *SteampipeWorkspaceProfile) GetOptionsForBlock(block *hcl.Block) (options.Options, hcl.Diagnostics)
GetOptionsForBlock returns the workspace profile options object for the given block
func (*SteampipeWorkspaceProfile) IsNil ¶
func (p *SteampipeWorkspaceProfile) IsNil() bool
func (*SteampipeWorkspaceProfile) Name ¶
func (p *SteampipeWorkspaceProfile) Name() string
func (*SteampipeWorkspaceProfile) OnDecoded ¶
func (p *SteampipeWorkspaceProfile) OnDecoded() hcl.Diagnostics
func (*SteampipeWorkspaceProfile) SetOptions ¶
func (p *SteampipeWorkspaceProfile) SetOptions(opts options.Options, block *hcl.Block) hcl.Diagnostics
SetOptions sets the options on the connection verify the options object is a valid options type
func (*SteampipeWorkspaceProfile) ShortName ¶
func (p *SteampipeWorkspaceProfile) ShortName() string
type WorkspaceProfile ¶
type WorkspaceProfile interface { SetOptions(opts options.Options, block *hcl.Block) hcl.Diagnostics Name() string ShortName() string CtyValue() (cty.Value, error) OnDecoded() hcl.Diagnostics ConfigMap(cmd *cobra.Command) map[string]interface{} GetDeclRange() *hcl.Range GetOptionsForBlock(*hcl.Block) (options.Options, hcl.Diagnostics) GetInstallDir() *string // IsNil implements slightly hacky way of doing nil checks with generic types IsNil() bool }