Documentation
¶
Index ¶
- Variables
- func OpenBrowser(url string) error
- func OutputMessage(ctx context.Context, msg string)
- func OutputWait(ctx context.Context, msg string)
- func RunForService(ctx context.Context, serverListen ListenType, serverPort ListenPort) error
- func StopDashboardService(ctx context.Context) error
- func WriteServiceStateFile(state *DashboardServiceState) error
- type AvailableDashboardsPayload
- type ClientRequest
- type ClientRequestDashboardPayload
- type ClientRequestPayload
- type ControlEventPayload
- type DashboardClientInfo
- type DashboardMetadata
- type DashboardMetadataPayload
- type DashboardServiceState
- type ErrorPayload
- type ExecutionCompletePayload
- type ExecutionErrorPayload
- type ExecutionStartedPayload
- type InputValuesClearedPayload
- type LeafNodeCompletePayload
- type ListenPort
- type ListenType
- type ModAvailableBenchmark
- type ModAvailableDashboard
- type ModDashboardMetadata
- type Server
- type ServiceState
Constants ¶
This section is empty.
Variables ¶
View Source
var ExecutionCompleteSchemaVersion int64 = 20220614
View Source
var ExecutionStartedSchemaVersion int64 = 20220614
Functions ¶
func OpenBrowser ¶
https://stackoverflow.com/questions/39320371/how-start-web-server-to-open-page-in-browser-in-golang
func OutputMessage ¶
func OutputWait ¶
func RunForService ¶
func RunForService(ctx context.Context, serverListen ListenType, serverPort ListenPort) error
RunForService spanws an execution of the 'steampipe dashboard' command. It is used when starting/restarting the steampipe service with the --dashboard flag set
func StopDashboardService ¶
func WriteServiceStateFile ¶
func WriteServiceStateFile(state *DashboardServiceState) error
Types ¶
type AvailableDashboardsPayload ¶
type AvailableDashboardsPayload struct {
Action string `json:"action"`
Dashboards map[string]ModAvailableDashboard `json:"dashboards"`
Benchmarks map[string]ModAvailableBenchmark `json:"benchmarks"`
}
type ClientRequest ¶
type ClientRequest struct {
Action string `json:"action"`
Payload ClientRequestPayload `json:"payload"`
}
type ClientRequestDashboardPayload ¶
type ClientRequestDashboardPayload struct {
FullName string `json:"full_name"`
}
type ClientRequestPayload ¶
type ClientRequestPayload struct {
Dashboard ClientRequestDashboardPayload `json:"dashboard"`
InputValues map[string]interface{} `json:"input_values"`
ChangedInput string `json:"changed_input"`
}
type ControlEventPayload ¶
type ControlEventPayload struct {
Action string `json:"action"`
Control controlstatus.ControlRunStatusProvider `json:"control"`
Name string `json:"name"`
Progress *controlstatus.ControlProgress `json:"progress"`
ExecutionId string `json:"execution_id"`
}
type DashboardClientInfo ¶
type DashboardMetadata ¶
type DashboardMetadata struct {
Mod ModDashboardMetadata `json:"mod"`
InstalledMods map[string]ModDashboardMetadata `json:"installed_mods,omitempty"`
Cloud *steampipeconfig.CloudMetadata `json:"cloud,omitempty"`
Telemetry string `json:"telemetry"`
}
type DashboardMetadataPayload ¶
type DashboardMetadataPayload struct {
Action string `json:"action"`
Metadata DashboardMetadata `json:"metadata"`
}
type DashboardServiceState ¶
type DashboardServiceState struct {
State ServiceState `json:"state"`
Error string `json:"error"`
Pid int `json:"pid"`
Port int `json:"port"`
ListenType string `json:"listen_type"`
Listen []string `json:"listen"`
StructVersion int64 `json:"struct_version"`
}
func GetDashboardServiceState ¶
func GetDashboardServiceState() (*DashboardServiceState, error)
func (*DashboardServiceState) Save ¶
func (s *DashboardServiceState) Save() error
type ErrorPayload ¶
type ExecutionCompletePayload ¶
type ExecutionCompletePayload struct {
SchemaVersion string `json:"schema_version"`
Action string `json:"action"`
DashboardNode dashboardtypes.DashboardNodeRun `json:"dashboard_node"`
Panels map[string]dashboardtypes.SnapshotPanel `json:"panels"`
ExecutionId string `json:"execution_id"`
Inputs map[string]interface{} `json:"inputs"`
Variables map[string]string `json:"variables"`
SearchPath []string `json:"search_path"`
StartTime time.Time `json:"start_time"`
EndTime time.Time `json:"end_time"`
Layout *dashboardtypes.SnapshotTreeNode `json:"layout"`
}
type ExecutionErrorPayload ¶
type ExecutionStartedPayload ¶
type ExecutionStartedPayload struct {
SchemaVersion string `json:"schema_version"`
Action string `json:"action"`
DashboardNode dashboardtypes.DashboardNodeRun `json:"dashboard_node"`
ExecutionId string `json:"execution_id"`
Panels map[string]dashboardtypes.SnapshotPanel `json:"panels"`
Layout *dashboardtypes.SnapshotTreeNode `json:"layout"`
}
type LeafNodeCompletePayload ¶
type LeafNodeCompletePayload struct {
Action string `json:"action"`
DashboardNode dashboardtypes.DashboardNodeRun `json:"dashboard_node"`
ExecutionId string `json:"execution_id"`
}
type ListenPort ¶
type ListenPort int
func (ListenPort) IsValid ¶
func (lp ListenPort) IsValid() error
IsValid is a validator for ListenType known values
type ListenType ¶
type ListenType string
const ( ListenTypeLocal ListenType = "local" ListenTypeNetwork ListenType = "network" )
func (ListenType) IsValid ¶
func (lt ListenType) IsValid() error
IsValid is a validator for ListenType known values
type ModAvailableBenchmark ¶
type ModAvailableBenchmark struct {
Title string `json:"title,omitempty"`
FullName string `json:"full_name"`
ShortName string `json:"short_name"`
Tags map[string]string `json:"tags"`
IsTopLevel bool `json:"is_top_level"`
Children []ModAvailableBenchmark `json:"children,omitempty"`
Trunks [][]string `json:"trunks"`
ModFullName string `json:"mod_full_name"`
}
type ModAvailableDashboard ¶
type ModDashboardMetadata ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) HandleWorkspaceUpdate ¶
func (s *Server) HandleWorkspaceUpdate(event dashboardevents.DashboardEvent)
type ServiceState ¶
type ServiceState string
const ( ServiceStateRunning ServiceState = "running" ServiceStateError ServiceState = "error" ServiceStateStructVersion = 20220411 )
Click to show internal directories.
Click to hide internal directories.