Documentation
¶
Index ¶
Constants ¶
const ( AnnotationSeverityName = "cld.severity" AnnotationSeverityType = "enum" AnnotationRiskName = "cld.risk" AnnotationRiskType = "enum" )
const ( AnnotationValueTypeName = "cld.value_type" AnnotationValueTypeType = "string" )
Value type annotation. Analyzers set this to describe the semantic type of a decoded parameter value. The renderer uses this to decide how to format the value for display.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type 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.
func ValueTypeAnnotation ¶
func ValueTypeAnnotation(valueType string) Annotation
ValueTypeAnnotation describes the semantic type of a parameter value. The analyzer knows what the raw decoded value represents (e.g., an Ethereum address, a token amount) and expresses that as a value type. The renderer reads this and decides how to format it for display. Examples: "ethereum.address", "ethereum.uint256", "hex", "truncate:20".
type Annotations ¶
type Annotations []Annotation