Documentation
¶
Index ¶
- Constants
- type Annotation
- func DiffAnnotation(field string, oldVal, newVal any, valueType string) Annotation
- func New(name, atype string, value any) Annotation
- func NewWithAnalyzer(name, atype string, value any, analyzerID string) Annotation
- func RiskAnnotation(level Risk) Annotation
- func SeverityAnnotation(level Severity) Annotation
- type Annotations
- type DiffValue
- type Risk
- type Severity
Constants ¶
View Source
const ( AnnotationSeverityName = "cld.severity" AnnotationSeverityType = "enum" AnnotationRiskName = "cld.risk" AnnotationRiskType = "enum" )
View Source
const ( AnnotationDiffName = "cld.diff" AnnotationDiffType = "diff" )
Diff annotation. Analyzers use this to express a value change (old -> new).
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Annotation ¶
func DiffAnnotation ¶
func DiffAnnotation(field string, oldVal, newVal any, valueType string) Annotation
DiffAnnotation creates a structured diff annotation.
func New ¶
func New(name, atype string, value any) Annotation
New creates a new annotation with the given name, type, and value.
func NewWithAnalyzer ¶
func NewWithAnalyzer(name, atype string, value any, analyzerID string) Annotation
NewWithAnalyzer creates a new annotation tagged with the ID of the analyzer that produced it.
func RiskAnnotation ¶
func RiskAnnotation(level Risk) Annotation
RiskAnnotation creates an annotation indicating risk level.
func SeverityAnnotation ¶
func SeverityAnnotation(level Severity) Annotation
SeverityAnnotation creates an annotation indicating analysis severity.
type Annotations ¶
type Annotations []Annotation
Click to show internal directories.
Click to hide internal directories.