templating

package
v0.55.2 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package templating includes helper methods that apply go templates to Dracon Raw and Enriched Issues and return the resulting str

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnrichedIssueWithConfidenceText added in v0.55.0

func EnrichedIssueWithConfidenceText(confidence string) enrichedIssueOption

EnrichedIssueWithConfidenceText allows customising the Enriched Issue's ConfidenceText.

func EnrichedIssueWithCount added in v0.55.0

func EnrichedIssueWithCount(count uint) enrichedIssueOption

EnrichedIssueWithCount allows customising the Enriched Issue's Count.

func EnrichedIssueWithFirstFound added in v0.55.0

func EnrichedIssueWithFirstFound(firstFound time.Time) enrichedIssueOption

EnrichedIssueWithFirstFound allows customising the Enriched Issue's Scan first found time.

func EnrichedIssueWithScanID added in v0.55.0

func EnrichedIssueWithScanID(scanID string) enrichedIssueOption

EnrichedIssueWithScanID allows customising the Enriched Issue's Scan ID.

func EnrichedIssueWithScanStartTime added in v0.55.0

func EnrichedIssueWithScanStartTime(startTime time.Time) enrichedIssueOption

EnrichedIssueWithScanStartTime allows customising the Enriched Issue's Scan start time.

func EnrichedIssueWithSeverityText added in v0.55.0

func EnrichedIssueWithSeverityText(severity string) enrichedIssueOption

EnrichedIssueWithSeverityText allows customising the Enriched Issue's SeverityText.

func EnrichedIssueWithToolName added in v0.55.0

func EnrichedIssueWithToolName(toolname string) enrichedIssueOption

EnrichedIssueWithToolName allows customising the Enriched Issue's ToolName.

func TemplateStringEnriched

func TemplateStringEnriched(inputTemplate string, issue *v1.EnrichedIssue, opts ...enrichedIssueOption) (*string, error)

TemplateStringEnriched applies the provided go template to the Enriched Issue provided and returns the resulting str

func TemplateStringRaw

func TemplateStringRaw(inputTemplate string, issue *v1.Issue) (*string, error)

TemplateStringRaw applies the provided go template to the Raw Issue provided and returns the resulting str

Types

This section is empty.

Jump to

Keyboard shortcuts

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