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 ¶
func ByLevel(level AnnotationLevel) DependencyAnnotationPredicate
ByLevel returns a predicate that matches annotations at the given level.
func ByName ¶
func ByName(name string) DependencyAnnotationPredicate
ByName returns a predicate that matches annotations with the given name.
func ByType ¶
func ByType(atype string) DependencyAnnotationPredicate
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().