annotationstore

package
v0.81.1 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnnotationLevel

type AnnotationLevel string

AnnotationLevel identifies which proposal-analysis level to read annotations from.

const (
	// AnnotationLevelProposal reads proposal-level annotations.
	AnnotationLevelProposal AnnotationLevel = "proposal"
	// AnnotationLevelBatchOperation reads batch-operation-level annotations.
	AnnotationLevelBatchOperation AnnotationLevel = "batch_operation"
	// AnnotationLevelCall reads call-level annotations.
	AnnotationLevelCall AnnotationLevel = "call"
	// AnnotationLevelParameter reads parameter-level annotations.
	AnnotationLevelParameter AnnotationLevel = "parameter"
)

type DependencyAnnotationPredicate

type DependencyAnnotationPredicate func(level AnnotationLevel, ann annotation.Annotation) bool

DependencyAnnotationPredicate is a function that tests whether a dependency annotation matches a condition in the context of its analysis level.

func ByAnalyzer

func ByAnalyzer(analyzerID string) DependencyAnnotationPredicate

ByAnalyzer returns a predicate that matches annotations produced by the given analyzer ID.

func ByLevel

ByLevel returns a predicate that matches annotations at the given level.

func ByName

ByName returns a predicate that matches annotations with the given name.

func ByType

ByType returns a predicate that matches annotations with the given type.

type DependencyAnnotationStore

type DependencyAnnotationStore interface {
	// DependencyAnnotations returns all annotations available to the current entity.
	DependencyAnnotations() annotation.Annotations

	// Filter returns dependency annotations matching every provided predicate.
	// Predicates can be composed using:
	//   - ByLevel
	//   - ByName
	//   - ByType
	//   - ByAnalyzer
	Filter(preds ...DependencyAnnotationPredicate) annotation.Annotations
}

DependencyAnnotationStore exposes dependency-scoped annotations for an analyzer.

Implementations MUST enforce that reads are limited to the current analyzer's declared Dependencies().

Jump to

Keyboard shortcuts

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