Documentation
¶
Index ¶
- Constants
- Variables
- func CounterRendererMinWidth() int
- func DetectionCounterRendererMinWidth() int
- func EnsureControlTemplates() error
- func EnsureDetectionTemplates() error
- func GetExporters(target modconfig.ModTreeItem) ([]export.Exporter, error)
- func GetMaxCols() int
- func PublishSnapshot(ctx context.Context, e *controlexecute.ExecutionTree, shouldShare bool) error
- func SnapshotToExecutionTree(ctx context.Context, snapshot *steampipeconfig.SteampipeSnapshot, ...) (*dashboardexecute.DetectionBenchmarkDisplayTree, error)
- func TruncateString(str string, length int) string
- type ControlColorSchemaDefinition
- type ControlColorScheme
- type ControlExporter
- type ControlRenderer
- type ControlResultRenderer
- type CounterGraphRenderer
- type CounterGraphRendererOptions
- type CounterRenderer
- type CounterRendererOptions
- type DetectionCounterRenderer
- type DetectionCounterRendererOptions
- type DetectionGroupHeadingRenderer
- type DetectionGroupRenderer
- type DetectionRenderer
- type DetectionResultRenderer
- type DetectionSummaryRenderer
- type DetectionTableRenderer
- type DimensionsRenderer
- type ErrorRenderer
- type FormatResolver
- type Formatter
- type FormatterBase
- type GroupHeadingRenderer
- type GroupRenderer
- type GroupTitleRenderer
- type NullFormatter
- func (j *NullFormatter) FileExtension() string
- func (j *NullFormatter) Format(ctx context.Context, tree *controlexecute.ExecutionTree) (io.Reader, error)
- func (*NullFormatter) FormatDetection(context.Context, *dashboardexecute.DetectionBenchmarkDisplayTree) (io.Reader, error)
- func (j *NullFormatter) Name() string
- type OutputTemplate
- type ResultReasonRenderer
- type ResultStatusRenderer
- type SeverityRenderer
- type SnapshotFormatter
- func (f *SnapshotFormatter) Alias() string
- func (f *SnapshotFormatter) FileExtension() string
- func (f *SnapshotFormatter) Format(ctx context.Context, tree *controlexecute.ExecutionTree) (io.Reader, error)
- func (*SnapshotFormatter) FormatDetection(context.Context, *dashboardexecute.DetectionBenchmarkDisplayTree) (io.Reader, error)
- func (f *SnapshotFormatter) Name() string
- type SpacerRenderer
- type SummaryRenderer
- type SummarySeverityRenderer
- type SummarySeverityRowRenderer
- type SummaryStatusRowRenderer
- type SummaryTotalRowRenderer
- type TableRenderer
- type TemplateFormatter
- func (tf TemplateFormatter) Alias() string
- func (tf TemplateFormatter) FileExtension() string
- func (tf TemplateFormatter) Format(_ context.Context, tree *controlexecute.ExecutionTree) (io.Reader, error)
- func (tf TemplateFormatter) FormatDetection(_ context.Context, tree *dashboardexecute.DetectionBenchmarkDisplayTree) (io.Reader, error)
- func (tf TemplateFormatter) Name() string
- type TemplateRenderConfig
- type TemplateRenderConstants
- type TemplateRenderContext
- type TemplateVersionFile
- type TextFormatter
- func (tf TextFormatter) Alias() string
- func (tf TextFormatter) FileExtension() string
- func (tf TextFormatter) Format(ctx context.Context, tree *controlexecute.ExecutionTree) (io.Reader, error)
- func (tf TextFormatter) FormatDetection(ctx context.Context, tree *dashboardexecute.DetectionBenchmarkDisplayTree) (io.Reader, error)
- func (tf TextFormatter) Name() string
Constants ¶
const MaxColumns = 200
Variables ¶
var ColorSchemes = map[string]*ControlColorSchemaDefinition{ "dark": { GroupTitle: "bold-bright-white", Severity: "bold-bright-yellow", CountZeroFail: "gray1", CountZeroFailDivider: "gray1", CountDivider: "gray2", CountFail: "bold-bright-red", CountTotal: "bright-white", CountTotalAllPassed: "bold-bright-green", CountGraphFail: "bright-red", CountGraphPass: "bright-green", CountGraphAlarm: "bright-red", CountGraphError: "bright-red", CountGraphInfo: "bright-cyan", CountGraphOK: "bright-green", CountGraphSkip: "gray3", CountGraphBracket: "gray2", StatusAlarm: "bold-bright-red", StatusError: "bold-bright-red", StatusSkip: "gray3", StatusInfo: "bright-cyan", StatusOK: "bright-green", StatusColon: "gray1", ReasonAlarm: "bright-red", ReasonError: "bright-red", ReasonSkip: "gray3", ReasonInfo: "bright-cyan", ReasonOK: "gray4", Spacer: "gray1", Indent: "gray1", UseColor: true, }, "light": { GroupTitle: "bold-bright-black", Severity: "bold-bright-yellow", CountZeroFail: "gray5", CountZeroFailDivider: "gray5", CountDivider: "gray4", CountFail: "bold-bright-red", CountTotal: "bright-black", CountTotalAllPassed: "bold-bright-green", CountGraphFail: "bright-red", CountGraphPass: "bright-green", CountGraphAlarm: "bright-red", CountGraphError: "bright-red", CountGraphInfo: "bright-cyan", CountGraphOK: "bright-green", CountGraphSkip: "gray3", CountGraphBracket: "gray4", StatusAlarm: "bold-bright-red", StatusError: "bold-bright-red", StatusSkip: "gray3", StatusInfo: "bright-cyan", StatusOK: "bright-green", StatusColon: "gray5", ReasonAlarm: "bright-red", ReasonError: "bright-red", ReasonSkip: "gray3", ReasonInfo: "bright-cyan", ReasonOK: "gray2", Spacer: "gray5", Indent: "gray5", UseColor: true, }, "plain": {UseColor: false}, }
Functions ¶
func CounterRendererMinWidth ¶
func CounterRendererMinWidth() int
func DetectionCounterRendererMinWidth ¶ added in v1.2.0
func DetectionCounterRendererMinWidth() int
func EnsureControlTemplates ¶ added in v1.2.0
func EnsureControlTemplates() error
EnsureControlTemplates scans the '$STEAMPIPE_INSTALL_DIR/check/templates' directory and copies over the templates defined in the 'templates' package if needed.
The name of the folder in the 'templates' package is used to identify templates in '$STEAMPIPE_INSTALL_DIR/check/templates' - where it is expected that a directory with the same name will exist.
We re-write the templates, when there is a higher template version available in the 'templates' package.
func EnsureDetectionTemplates ¶ added in v1.2.0
func EnsureDetectionTemplates() error
EnsureDetectionTemplates scans the '$STEAMPIPE_INSTALL_DIR/check/detection_templates' directory and copies over the templates defined in the 'templates' package if needed.
The name of the folder in the 'templates' package is used to identify templates in '$STEAMPIPE_INSTALL_DIR/check/detection_templates' - where it is expected that a directory with the same name will exist.
We re-write the templates, when there is a higher template version available in the 'templates' package.
func GetExporters ¶
func GetExporters(target modconfig.ModTreeItem) ([]export.Exporter, error)
GetExporters returns an array of ControlExporters corresponding to the available output formats
func GetMaxCols ¶
func GetMaxCols() int
func PublishSnapshot ¶
func PublishSnapshot(ctx context.Context, e *controlexecute.ExecutionTree, shouldShare bool) error
func SnapshotToExecutionTree ¶ added in v1.2.0
func SnapshotToExecutionTree(ctx context.Context, snapshot *steampipeconfig.SteampipeSnapshot, w *workspace.PowerpipeWorkspace, targets ...modconfig.ModTreeItem) (*dashboardexecute.DetectionBenchmarkDisplayTree, error)
func TruncateString ¶
Types ¶
type ControlColorSchemaDefinition ¶
type ControlColorSchemaDefinition struct { // group GroupTitle string Severity string CountZeroFail string CountZeroFailDivider string CountDivider string CountFail string CountTotal string CountTotalAllPassed string CountGraphFail string CountGraphPass string CountGraphAlarm string CountGraphError string CountGraphInfo string CountGraphOK string CountGraphSkip string CountGraphBracket string // results StatusAlarm string StatusError string StatusSkip string StatusInfo string StatusOK string StatusColon string ReasonAlarm string ReasonError string ReasonSkip string ReasonInfo string ReasonOK string Spacer string Indent string UseColor bool }
type ControlColorScheme ¶
type ControlColorScheme struct { GroupTitle colorFunc Severity colorFunc CountZeroFail colorFunc CountZeroFailDivider colorFunc CountDivider colorFunc CountFail colorFunc CountTotal colorFunc CountTotalAllPassed colorFunc CountGraphFail colorFunc CountGraphPass colorFunc CountGraphAlarm colorFunc CountGraphError colorFunc CountGraphInfo colorFunc CountGraphOK colorFunc CountGraphSkip colorFunc CountGraphBracket colorFunc StatusAlarm colorFunc StatusError colorFunc StatusSkip colorFunc StatusInfo colorFunc StatusOK colorFunc StatusColon colorFunc ReasonAlarm colorFunc ReasonError colorFunc ReasonSkip colorFunc ReasonInfo colorFunc ReasonOK colorFunc Spacer colorFunc Indent colorFunc ReasonColors map[string]colorFunc StatusColors map[string]colorFunc GraphColors map[string]colorFunc UseColor bool }
var ControlColors *ControlColorScheme
ControlColors is a global variable containing the current control color scheme
func NewControlColorScheme ¶
func NewControlColorScheme(def *ControlColorSchemaDefinition) (*ControlColorScheme, error)
func (*ControlColorScheme) Initialise ¶
func (c *ControlColorScheme) Initialise(def *ControlColorSchemaDefinition) error
type ControlExporter ¶
type ControlExporter struct {
// contains filtered or unexported fields
}
func NewControlExporter ¶
func NewControlExporter(formatter Formatter) *ControlExporter
func (*ControlExporter) Alias ¶
func (e *ControlExporter) Alias() string
func (*ControlExporter) Export ¶
func (e *ControlExporter) Export(ctx context.Context, input export.ExportSourceData, destPath string) error
func (*ControlExporter) FileExtension ¶
func (e *ControlExporter) FileExtension() string
func (*ControlExporter) Name ¶
func (e *ControlExporter) Name() string
type ControlRenderer ¶
type ControlRenderer struct {
// contains filtered or unexported fields
}
func NewControlRenderer ¶
func NewControlRenderer(run *controlexecute.ControlRun, parent *GroupRenderer) *ControlRenderer
func (ControlRenderer) Render ¶
func (r ControlRenderer) Render() string
type ControlResultRenderer ¶ added in v1.2.0
type ControlResultRenderer struct {
// contains filtered or unexported fields
}
func NewControlResultRenderer ¶ added in v1.2.0
func NewControlResultRenderer(status, reason string, dimensions []controlexecute.Dimension, colorGenerator *controlexecute.DimensionColorGenerator, width int, indent string) *ControlResultRenderer
func (ControlResultRenderer) Render ¶ added in v1.2.0
func (r ControlResultRenderer) Render() string
type CounterGraphRenderer ¶
type CounterGraphRenderer struct {
// contains filtered or unexported fields
}
func NewCounterGraphRenderer ¶
func NewCounterGraphRenderer(failedControls, totalControls, maxTotalControls int, options CounterGraphRendererOptions) *CounterGraphRenderer
func (CounterGraphRenderer) Render ¶
func (r CounterGraphRenderer) Render() string
type CounterGraphRendererOptions ¶
type CounterGraphRendererOptions struct {
FailedColorFunc colorFunc
}
type CounterRenderer ¶
type CounterRenderer struct {
// contains filtered or unexported fields
}
func NewCounterRenderer ¶
func NewCounterRenderer(failedControls, totalControls, maxFailedControls, maxTotalControls int, options CounterRendererOptions) *CounterRenderer
func (CounterRenderer) Render ¶
func (r CounterRenderer) Render() string
type CounterRendererOptions ¶
type CounterRendererOptions struct {
AddLeadingSpace bool
}
type DetectionCounterRenderer ¶ added in v1.2.0
type DetectionCounterRenderer struct {
// contains filtered or unexported fields
}
func NewDetectionCounterRenderer ¶ added in v1.2.0
func NewDetectionCounterRenderer(count int, options DetectionCounterRendererOptions) *DetectionCounterRenderer
func (DetectionCounterRenderer) Render ¶ added in v1.2.0
func (r DetectionCounterRenderer) Render() string
type DetectionCounterRendererOptions ¶ added in v1.2.0
type DetectionCounterRendererOptions struct {
AddLeadingSpace bool
}
type DetectionGroupHeadingRenderer ¶ added in v1.2.0
type DetectionGroupHeadingRenderer struct {
// contains filtered or unexported fields
}
func NewDetectionGroupHeadingRenderer ¶ added in v1.2.0
func NewDetectionGroupHeadingRenderer(title string, count, width int, indent string) *DetectionGroupHeadingRenderer
func (DetectionGroupHeadingRenderer) Render ¶ added in v1.2.0
func (r DetectionGroupHeadingRenderer) Render() string
type DetectionGroupRenderer ¶ added in v1.2.0
type DetectionGroupRenderer struct {
// contains filtered or unexported fields
}
func NewDetectionGroupRenderer ¶ added in v1.2.0
func NewDetectionGroupRenderer(group *dashboardexecute.DetectionBenchmarkDisplay, parent *DetectionGroupRenderer, resultTree *dashboardexecute.DetectionBenchmarkDisplayTree, width int) *DetectionGroupRenderer
func (DetectionGroupRenderer) Render ¶ added in v1.2.0
func (r DetectionGroupRenderer) Render() string
type DetectionRenderer ¶ added in v1.2.0
type DetectionRenderer struct {
// contains filtered or unexported fields
}
func NewDetectionRenderer ¶ added in v1.2.0
func NewDetectionRenderer(run *dashboardexecute.DetectionRun, parent *DetectionGroupRenderer) *DetectionRenderer
func (DetectionRenderer) Render ¶ added in v1.2.0
func (r DetectionRenderer) Render() string
type DetectionResultRenderer ¶ added in v1.2.0
type DetectionResultRenderer struct {
// contains filtered or unexported fields
}
func NewDetectionResultRenderer ¶ added in v1.2.0
func NewDetectionResultRenderer(displayValues []string, dimensions []controlexecute.Dimension, colorGenerator *controlexecute.DimensionColorGenerator, width int, indent string) *DetectionResultRenderer
func (DetectionResultRenderer) Render ¶ added in v1.2.0
func (r DetectionResultRenderer) Render() string
type DetectionSummaryRenderer ¶ added in v1.2.0
type DetectionSummaryRenderer struct {
// contains filtered or unexported fields
}
func NewDetectionSummaryRenderer ¶ added in v1.2.0
func NewDetectionSummaryRenderer(resultTree *dashboardexecute.DetectionBenchmarkDisplayTree, width int) *DetectionSummaryRenderer
func (DetectionSummaryRenderer) Render ¶ added in v1.2.0
func (r DetectionSummaryRenderer) Render() string
type DetectionTableRenderer ¶ added in v1.2.0
type DetectionTableRenderer struct {
// contains filtered or unexported fields
}
func NewDetectionTableRenderer ¶ added in v1.2.0
func NewDetectionTableRenderer(resultTree *dashboardexecute.DetectionBenchmarkDisplayTree) *DetectionTableRenderer
func (DetectionTableRenderer) MinimumWidth ¶ added in v1.2.0
func (r DetectionTableRenderer) MinimumWidth() int
MinimumWidth is the width we require It is determined by the left indent, title, severity, counter and counter graph
func (DetectionTableRenderer) Render ¶ added in v1.2.0
func (r DetectionTableRenderer) Render(width int) string
type DimensionsRenderer ¶
type DimensionsRenderer struct {
// contains filtered or unexported fields
}
func NewDimensionsRenderer ¶
func NewDimensionsRenderer(dimensions []controlexecute.Dimension, colorGenerator *controlexecute.DimensionColorGenerator, width int) *DimensionsRenderer
func (DimensionsRenderer) Render ¶
func (r DimensionsRenderer) Render() string
Render returns the dimensions, truncated to the max length if necessary
type ErrorRenderer ¶
type ErrorRenderer struct {
// contains filtered or unexported fields
}
func NewErrorRenderer ¶
func NewErrorRenderer(err error, width int, indent string) *ErrorRenderer
func (ErrorRenderer) Render ¶
func (r ErrorRenderer) Render() string
type FormatResolver ¶
type FormatResolver struct {
// contains filtered or unexported fields
}
func NewFormatResolver ¶
func NewFormatResolver(target modconfig.ModTreeItem) (*FormatResolver, error)
func (*FormatResolver) GetFormatter ¶
func (r *FormatResolver) GetFormatter(arg string) (Formatter, error)
type Formatter ¶
type Formatter interface { FormatDetection(ctx context.Context, tree *dashboardexecute.DetectionBenchmarkDisplayTree) (io.Reader, error) Format(ctx context.Context, tree *controlexecute.ExecutionTree) (io.Reader, error) FileExtension() string Name() string Alias() string }
type FormatterBase ¶
type FormatterBase struct{}
func (*FormatterBase) Alias ¶
func (*FormatterBase) Alias() string
type GroupHeadingRenderer ¶
type GroupHeadingRenderer struct {
// contains filtered or unexported fields
}
func NewGroupHeadingRenderer ¶
func NewGroupHeadingRenderer(title string, failed, total, maxFailed, maxTotal, width int, indent string) *GroupHeadingRenderer
func (GroupHeadingRenderer) Render ¶
func (r GroupHeadingRenderer) Render() string
type GroupRenderer ¶
type GroupRenderer struct {
// contains filtered or unexported fields
}
func NewGroupRenderer ¶
func NewGroupRenderer(group *controlexecute.ResultGroup, parent *GroupRenderer, maxFailedControls, maxTotalControls int, resultTree *controlexecute.ExecutionTree, width int) *GroupRenderer
func (GroupRenderer) Render ¶
func (r GroupRenderer) Render() string
type GroupTitleRenderer ¶
type GroupTitleRenderer struct {
// contains filtered or unexported fields
}
func NewGroupTitleRenderer ¶
func NewGroupTitleRenderer(title string, width int) *GroupTitleRenderer
func (GroupTitleRenderer) Render ¶
func (r GroupTitleRenderer) Render() string
Render returns the title, truncated to the max length if necessary NOTE: adds a trailing space
type NullFormatter ¶
type NullFormatter struct {
FormatterBase
}
NullFormatter is to be used when no output is expected. It always returns a `io.Reader` which reads an empty string
func (*NullFormatter) FileExtension ¶
func (j *NullFormatter) FileExtension() string
func (*NullFormatter) Format ¶
func (j *NullFormatter) Format(ctx context.Context, tree *controlexecute.ExecutionTree) (io.Reader, error)
func (*NullFormatter) FormatDetection ¶ added in v1.2.0
func (*NullFormatter) FormatDetection(context.Context, *dashboardexecute.DetectionBenchmarkDisplayTree) (io.Reader, error)
func (*NullFormatter) Name ¶
func (j *NullFormatter) Name() string
type OutputTemplate ¶
type OutputTemplate struct { TemplatePath string FormatName string FileExtension string FormatFullName string }
func NewOutputTemplate ¶
func NewOutputTemplate(directoryPath string) *OutputTemplate
func (*OutputTemplate) String ¶
func (ft *OutputTemplate) String() string
type ResultReasonRenderer ¶
type ResultReasonRenderer struct {
// contains filtered or unexported fields
}
func NewResultReasonRenderer ¶
func NewResultReasonRenderer(status, reason string, width int) *ResultReasonRenderer
func (ResultReasonRenderer) Render ¶
func (r ResultReasonRenderer) Render() string
Render returns the reason, truncated to the max length if necessary NOTE: adds a trailing space
type ResultStatusRenderer ¶
type ResultStatusRenderer struct {
// contains filtered or unexported fields
}
func NewResultStatusRenderer ¶
func NewResultStatusRenderer(status string) *ResultStatusRenderer
func (ResultStatusRenderer) Render ¶
func (r ResultStatusRenderer) Render() string
Render returns the status
type SeverityRenderer ¶
type SeverityRenderer struct {
// contains filtered or unexported fields
}
func NewSeverityRenderer ¶
func NewSeverityRenderer(severity string) *SeverityRenderer
func (SeverityRenderer) Render ¶
func (r SeverityRenderer) Render() string
Render returns ther severity oin upper case, got 'critical' and 'high' severities for all other values an empty string is returned NOTE: adds a trailing space
type SnapshotFormatter ¶
type SnapshotFormatter struct {
FormatterBase
}
func (*SnapshotFormatter) Alias ¶
func (f *SnapshotFormatter) Alias() string
func (*SnapshotFormatter) FileExtension ¶
func (f *SnapshotFormatter) FileExtension() string
func (*SnapshotFormatter) Format ¶
func (f *SnapshotFormatter) Format(ctx context.Context, tree *controlexecute.ExecutionTree) (io.Reader, error)
func (*SnapshotFormatter) FormatDetection ¶ added in v1.2.0
func (*SnapshotFormatter) FormatDetection(context.Context, *dashboardexecute.DetectionBenchmarkDisplayTree) (io.Reader, error)
func (*SnapshotFormatter) Name ¶
func (f *SnapshotFormatter) Name() string
type SpacerRenderer ¶
type SpacerRenderer struct {
// contains filtered or unexported fields
}
func NewSpacerRenderer ¶
func NewSpacerRenderer(width int) *SpacerRenderer
func (SpacerRenderer) Render ¶
func (r SpacerRenderer) Render() string
Render returns a divider string of format: "....... " NOTE: adds a trailing space
type SummaryRenderer ¶
type SummaryRenderer struct {
// contains filtered or unexported fields
}
func NewSummaryRenderer ¶
func NewSummaryRenderer(resultTree *controlexecute.ExecutionTree, width int) *SummaryRenderer
func (SummaryRenderer) Render ¶
func (r SummaryRenderer) Render() string
type SummarySeverityRenderer ¶
type SummarySeverityRenderer struct {
// contains filtered or unexported fields
}
func NewSummarySeverityRenderer ¶
func NewSummarySeverityRenderer(resultTree *controlexecute.ExecutionTree, width int) *SummarySeverityRenderer
func (*SummarySeverityRenderer) Render ¶
func (r *SummarySeverityRenderer) Render() []string
type SummarySeverityRowRenderer ¶
type SummarySeverityRowRenderer struct {
// contains filtered or unexported fields
}
func NewSummarySeverityRowRenderer ¶
func NewSummarySeverityRowRenderer(resultTree *controlexecute.ExecutionTree, width int, severity string) *SummarySeverityRowRenderer
func (*SummarySeverityRowRenderer) Render ¶
func (r *SummarySeverityRowRenderer) Render() string
type SummaryStatusRowRenderer ¶
type SummaryStatusRowRenderer struct {
// contains filtered or unexported fields
}
func NewSummaryStatusRowRenderer ¶
func NewSummaryStatusRowRenderer(resultTree *controlexecute.ExecutionTree, width int, status string) *SummaryStatusRowRenderer
func (*SummaryStatusRowRenderer) Render ¶
func (r *SummaryStatusRowRenderer) Render() string
type SummaryTotalRowRenderer ¶
type SummaryTotalRowRenderer struct {
// contains filtered or unexported fields
}
func NewSummaryTotalRowRenderer ¶
func NewSummaryTotalRowRenderer(resultTree *controlexecute.ExecutionTree, width int) *SummaryTotalRowRenderer
func (*SummaryTotalRowRenderer) Render ¶
func (r *SummaryTotalRowRenderer) Render() string
type TableRenderer ¶
type TableRenderer struct {
// contains filtered or unexported fields
}
func NewTableRenderer ¶
func NewTableRenderer(resultTree *controlexecute.ExecutionTree) *TableRenderer
func (TableRenderer) MinimumWidth ¶
func (r TableRenderer) MinimumWidth() int
MinimumWidth is the width we require It is determined by the left indent, title, severity, counter and counter graph
func (TableRenderer) Render ¶
func (r TableRenderer) Render(width int) string
type TemplateFormatter ¶
type TemplateFormatter struct {
// contains filtered or unexported fields
}
TemplateFormatter implements the 'Formatter' interface and exposes a generic template based output mechanism for 'check' execution trees
func NewTemplateFormatter ¶
func NewTemplateFormatter(input *OutputTemplate) (*TemplateFormatter, error)
func (TemplateFormatter) Alias ¶
func (tf TemplateFormatter) Alias() string
func (TemplateFormatter) FileExtension ¶
func (tf TemplateFormatter) FileExtension() string
func (TemplateFormatter) Format ¶
func (tf TemplateFormatter) Format(_ context.Context, tree *controlexecute.ExecutionTree) (io.Reader, error)
func (TemplateFormatter) FormatDetection ¶ added in v1.2.0
func (tf TemplateFormatter) FormatDetection(_ context.Context, tree *dashboardexecute.DetectionBenchmarkDisplayTree) (io.Reader, error)
func (TemplateFormatter) Name ¶
func (tf TemplateFormatter) Name() string
type TemplateRenderConfig ¶
type TemplateRenderConstants ¶
type TemplateRenderContext ¶
type TemplateRenderContext struct { Constants TemplateRenderConstants Config TemplateRenderConfig Data any }
type TemplateVersionFile ¶
type TemplateVersionFile struct {
Version string `json:"version"`
}
type TextFormatter ¶
type TextFormatter struct {
FormatterBase
}
func (TextFormatter) Alias ¶
func (tf TextFormatter) Alias() string
func (TextFormatter) FileExtension ¶
func (tf TextFormatter) FileExtension() string
func (TextFormatter) Format ¶
func (tf TextFormatter) Format(ctx context.Context, tree *controlexecute.ExecutionTree) (io.Reader, error)
func (TextFormatter) FormatDetection ¶ added in v1.2.0
func (tf TextFormatter) FormatDetection(ctx context.Context, tree *dashboardexecute.DetectionBenchmarkDisplayTree) (io.Reader, error)
func (TextFormatter) Name ¶
func (tf TextFormatter) Name() string
Source Files
¶
- color_scheme.go
- control.go
- control_exporter.go
- control_result.go
- detection.go
- detection_group.go
- detection_group_counter.go
- detection_group_heading.go
- detection_result.go
- detection_summary.go
- detection_table.go
- dimensions.go
- error.go
- format_resolver.go
- formatter.go
- formatter_fs.go
- formatter_null.go
- formatter_snapshot.go
- formatter_template.go
- formatter_text.go
- get_exporters.go
- group.go
- group_counter.go
- group_counter_graph.go
- group_heading.go
- group_title.go
- max_columns.go
- output_formatters.go
- output_template.go
- result_reason.go
- result_status.go
- severity.go
- snapshot.go
- spacer.go
- summary.go
- summary_severity.go
- summary_severity_row.go
- summary_status_row.go
- summary_total_row.go
- table.go
- template_functions.go
- template_render_context.go
- truncate.go