reportexecute

package
v0.13.0-alpha.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 4, 2022 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecuteReportNode

func ExecuteReportNode(ctx context.Context, reportName string, workspace *workspace.Workspace, client db_common.Client) error

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

func (r *CheckRun) ChildrenComplete() bool

ChildrenComplete implements ReportNodeRun

func (*CheckRun) Execute

func (r *CheckRun) Execute(ctx context.Context) error

Execute implements ReportRunNode

func (*CheckRun) GetName

func (r *CheckRun) GetName() string

GetName implements ReportNodeRun

func (*CheckRun) GetPath

func (r *CheckRun) GetPath() modconfig.NodePath

GetPath implements ReportNodeRun

func (*CheckRun) GetRunStatus

func (r *CheckRun) GetRunStatus() reportinterfaces.ReportRunStatus

GetRunStatus implements ReportNodeRun

func (*CheckRun) RunComplete

func (r *CheckRun) RunComplete() bool

RunComplete implements ReportNodeRun

func (*CheckRun) SetComplete

func (r *CheckRun) SetComplete()

SetComplete implements ReportNodeRun

func (*CheckRun) SetError

func (r *CheckRun) SetError(err error)

SetError 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 (*ControlEventHooks) OnStart

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

func (r *LeafRun) ChildrenComplete() bool

ChildrenComplete implements ReportNodeRun

func (*LeafRun) Execute

func (r *LeafRun) Execute(ctx context.Context) error

Execute implements ReportRunNode

func (*LeafRun) GetName

func (r *LeafRun) GetName() string

GetName implements ReportNodeRun

func (*LeafRun) GetPath

func (r *LeafRun) GetPath() modconfig.NodePath

GetPath implements ReportNodeRun

func (*LeafRun) GetRunStatus

func (r *LeafRun) GetRunStatus() reportinterfaces.ReportRunStatus

GetRunStatus implements ReportNodeRun

func (*LeafRun) RunComplete

func (r *LeafRun) RunComplete() bool

RunComplete implements ReportNodeRun

func (*LeafRun) SetComplete

func (r *LeafRun) SetComplete()

SetComplete implements ReportNodeRun

func (*LeafRun) SetError

func (r *LeafRun) SetError(err error)

SetError 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

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL