Documentation ¶
Index ¶
- func ExecuteReportNode(ctx context.Context, reportName string, workspace *workspace.Workspace, ...) error
- type CheckRun
- func (r *CheckRun) ChildrenComplete() bool
- func (r *CheckRun) Execute(ctx context.Context) error
- func (r *CheckRun) GetName() string
- func (r *CheckRun) GetPath() modconfig.NodePath
- func (r *CheckRun) GetRunStatus() reportinterfaces.ReportRunStatus
- func (r *CheckRun) RunComplete() bool
- func (r *CheckRun) SetComplete()
- func (r *CheckRun) SetError(err error)
- type ControlEventHooks
- type LeafData
- type LeafDataColumnType
- type LeafRun
- func (r *LeafRun) ChildrenComplete() bool
- func (r *LeafRun) Execute(ctx context.Context) error
- func (r *LeafRun) GetName() string
- func (r *LeafRun) GetPath() modconfig.NodePath
- func (r *LeafRun) GetRunStatus() reportinterfaces.ReportRunStatus
- func (r *LeafRun) RunComplete() bool
- func (r *LeafRun) SetComplete()
- func (r *LeafRun) SetError(err error)
- type ReportContainerRun
- func (r *ReportContainerRun) ChildCompleteChan() chan reportinterfaces.ReportNodeRun
- func (r *ReportContainerRun) ChildrenComplete() bool
- func (r *ReportContainerRun) Execute(ctx context.Context) error
- func (r *ReportContainerRun) GetName() string
- func (r *ReportContainerRun) GetPath() modconfig.NodePath
- func (r *ReportContainerRun) GetRunStatus() reportinterfaces.ReportRunStatus
- func (r *ReportContainerRun) RunComplete() bool
- func (r *ReportContainerRun) SetComplete()
- func (r *ReportContainerRun) SetError(err error)
- type ReportExecutionTree
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CheckRun ¶
type CheckRun struct { Name string `json:"name"` Title string `json:"title,omitempty"` Width int `json:"width,omitempty"` Error error `json:"error,omitempty"` NodeType string `json:"node_type"` ControlExecutionTree *controlexecute.ExecutionTree `json:"execution_tree"` ReportNode modconfig.ReportingLeafNode `json:"-"` Path []string `json:"-"` // contains filtered or unexported fields }
CheckRun is a struct representing the execution of a leaf reporting node
func NewCheckRun ¶
func NewCheckRun(resource modconfig.ReportingLeafNode, parent reportinterfaces.ReportNodeParent, executionTree *ReportExecutionTree) (*CheckRun, error)
func (*CheckRun) ChildrenComplete ¶
ChildrenComplete implements ReportNodeRun
func (*CheckRun) GetRunStatus ¶
func (r *CheckRun) GetRunStatus() reportinterfaces.ReportRunStatus
GetRunStatus implements ReportNodeRun
func (*CheckRun) RunComplete ¶
RunComplete implements ReportNodeRun
func (*CheckRun) SetComplete ¶
func (r *CheckRun) SetComplete()
SetComplete implements ReportNodeRun
type ControlEventHooks ¶
type ControlEventHooks struct {
CheckRun *CheckRun
}
ControlEventHooks is a struct which implements ControlHooks, and displays the control progress as a status message
func NewControlEventHooks ¶
func NewControlEventHooks(r *CheckRun) *ControlEventHooks
func (*ControlEventHooks) OnControlEvent ¶
func (c *ControlEventHooks) OnControlEvent(ctx context.Context, _ *controlhooks.ControlProgress)
func (*ControlEventHooks) OnDone ¶
func (c *ControlEventHooks) OnDone(ctx context.Context, _ *controlhooks.ControlProgress)
func (*ControlEventHooks) OnStart ¶
func (c *ControlEventHooks) OnStart(ctx context.Context, _ *controlhooks.ControlProgress)
type LeafData ¶
type LeafData struct { Columns []*LeafDataColumnType `json:"columns"` Rows [][]interface{} `json:"rows"` }
func NewLeafData ¶
func NewLeafData(result *queryresult.SyncQueryResult) *LeafData
type LeafDataColumnType ¶
type LeafDataColumnType struct { Name string `json:"name"` DataType string `json:"data_type_name"` }
func NewLeafDataColumnType ¶
func NewLeafDataColumnType(sqlType *sql.ColumnType) *LeafDataColumnType
type LeafRun ¶
type LeafRun struct { Name string `json:"name"` Title string `json:"title,omitempty"` Width int `json:"width,omitempty"` SQL string `json:"sql,omitempty"` Data *LeafData `json:"data,omitempty"` Error error `json:"error,omitempty"` ReportNode modconfig.ReportingLeafNode `json:"properties"` NodeType string `json:"node_type"` Path []string `json:"-"` // contains filtered or unexported fields }
LeafRun is a struct representing the execution of a leaf reporting node
func NewLeafRun ¶
func NewLeafRun(resource modconfig.ReportingLeafNode, parent reportinterfaces.ReportNodeParent, executionTree *ReportExecutionTree) (*LeafRun, error)
func (*LeafRun) ChildrenComplete ¶
ChildrenComplete implements ReportNodeRun
func (*LeafRun) GetRunStatus ¶
func (r *LeafRun) GetRunStatus() reportinterfaces.ReportRunStatus
GetRunStatus implements ReportNodeRun
func (*LeafRun) RunComplete ¶
RunComplete implements ReportNodeRun
type ReportContainerRun ¶
type ReportContainerRun struct { Name string `json:"name"` Title string `json:"title,omitempty"` Width int `json:"width,omitempty"` Height int `json:"height,omitempty"` Source string `json:"source,omitempty"` SQL string `json:"sql,omitempty"` Error error `json:"error,omitempty"` Children []reportinterfaces.ReportNodeRun `json:"children,omitempty"` NodeType string `json:"node_type"` Status reportinterfaces.ReportRunStatus `json:"status"` Path []string `json:"-"` // contains filtered or unexported fields }
ReportContainerRun is a struct representing a container run
func NewReportContainerRun ¶
func NewReportContainerRun(container *modconfig.ReportContainer, parent reportinterfaces.ReportNodeParent, executionTree *ReportExecutionTree) (*ReportContainerRun, error)
func (*ReportContainerRun) ChildCompleteChan ¶
func (r *ReportContainerRun) ChildCompleteChan() chan reportinterfaces.ReportNodeRun
func (*ReportContainerRun) ChildrenComplete ¶
func (r *ReportContainerRun) ChildrenComplete() bool
ChildrenComplete implements ReportNodeRun
func (*ReportContainerRun) Execute ¶
func (r *ReportContainerRun) Execute(ctx context.Context) error
Execute implements ReportRunNode execute all children and wait for them to complete
func (*ReportContainerRun) GetName ¶
func (r *ReportContainerRun) GetName() string
GetName implements ReportNodeRun
func (*ReportContainerRun) GetPath ¶
func (r *ReportContainerRun) GetPath() modconfig.NodePath
GetPath implements ReportNodeRun
func (*ReportContainerRun) GetRunStatus ¶
func (r *ReportContainerRun) GetRunStatus() reportinterfaces.ReportRunStatus
GetRunStatus implements ReportNodeRun
func (*ReportContainerRun) RunComplete ¶
func (r *ReportContainerRun) RunComplete() bool
RunComplete implements ReportNodeRun
func (*ReportContainerRun) SetComplete ¶
func (r *ReportContainerRun) SetComplete()
SetComplete implements ReportNodeRun
func (*ReportContainerRun) SetError ¶
func (r *ReportContainerRun) SetError(err error)
SetError implements ReportNodeRun tell parent we are done
type ReportExecutionTree ¶
type ReportExecutionTree struct { Root reportinterfaces.ReportNodeRun // contains filtered or unexported fields }
ReportExecutionTree is a structure representing the control result hierarchy
func NewReportExecutionTree ¶
func NewReportExecutionTree(reportName string, client db_common.Client, workspace *workspace.Workspace) (*ReportExecutionTree, error)
NewReportExecutionTree creates a result group from a ModTreeItem
func (*ReportExecutionTree) ChildCompleteChan ¶
func (e *ReportExecutionTree) ChildCompleteChan() chan reportinterfaces.ReportNodeRun
ChildCompleteChan implements ReportNodeParent
func (*ReportExecutionTree) Execute ¶
func (e *ReportExecutionTree) Execute(ctx context.Context) error
func (*ReportExecutionTree) GetName ¶
func (e *ReportExecutionTree) GetName() string
GetName implements ReportNodeParent use mod chort name - this will be the root name for all child runs