generators

package
v0.123.11 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnalyzerGenerator

type AnalyzerGenerator struct {
	// contains filtered or unexported fields
}

AnalyzerGenerator generates analyzer specifications from requirements

func NewAnalyzerGenerator

func NewAnalyzerGenerator() *AnalyzerGenerator

NewAnalyzerGenerator creates a new analyzer generator with default templates

func (*AnalyzerGenerator) GenerateAnalyzers

func (g *AnalyzerGenerator) GenerateAnalyzers(ctx context.Context, requirements *analyzer.RequirementSpec, opts *GenerationOptions) ([]analyzer.AnalyzerSpec, error)

GenerateAnalyzers creates analyzer specifications from requirements

func (*AnalyzerGenerator) RegisterTemplate

func (g *AnalyzerGenerator) RegisterTemplate(name string, template AnalyzerTemplate) error

RegisterTemplate registers a custom analyzer template

func (*AnalyzerGenerator) RegisterValidator

func (g *AnalyzerGenerator) RegisterValidator(name string, validator RequirementValidator) error

RegisterValidator registers a custom requirement validator

func (*AnalyzerGenerator) ValidateRequirements

func (g *AnalyzerGenerator) ValidateRequirements(ctx context.Context, requirements *analyzer.RequirementSpec) error

ValidateRequirements validates a requirement specification

type AnalyzerTemplate

type AnalyzerTemplate struct {
	Name        string
	Description string
	Category    string
	Priority    int
	Generator   func(ctx context.Context, req interface{}) ([]analyzer.AnalyzerSpec, error)
	Validator   func(req interface{}) error
}

AnalyzerTemplate defines how to generate analyzers for specific requirement types

type GenerationOptions

type GenerationOptions struct {
	IncludeOptional bool
	Strict          bool
	DefaultPriority int
	CategoryFilter  []string
	CustomTemplates map[string]AnalyzerTemplate
}

GenerationOptions configures analyzer generation

type RequirementValidator

type RequirementValidator func(requirement interface{}) error

RequirementValidator validates requirement specifications

Jump to

Keyboard shortcuts

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