Documentation
¶
Index ¶
- type API
- func (a *API) GetAdapters() *adapters.CompositeAdapter
- func (a *API) GetConfig() *Config
- func (a *API) GetHandlers() *handlers.Handlers
- func (a *API) GetRouter() chi.Router
- func (a *API) GetSSEManager() *sse.Manager
- func (a *API) IsRunning() bool
- func (a *API) Start(ctx context.Context) error
- func (a *API) Stop(ctx context.Context) error
- type Config
- type Services
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
API represents the main API v1 instance
func (*API) GetAdapters ¶
func (a *API) GetAdapters() *adapters.CompositeAdapter
GetAdapters returns the composite adapter
func (*API) GetHandlers ¶
GetHandlers returns the handlers instance
func (*API) GetSSEManager ¶
GetSSEManager returns the SSE manager instance
type Config ¶
type Config struct {
// Authentication configuration
EnableAuth bool `yaml:"enable_auth" json:"enable_auth"`
JWTSecret string `yaml:"jwt_secret" json:"jwt_secret"`
APIKeys map[string]string `yaml:"api_keys" json:"api_keys"`
// CORS configuration
CORSOrigins []string `yaml:"cors_origins" json:"cors_origins"`
EnableCORS bool `yaml:"enable_cors" json:"enable_cors"`
CORSAllowHeaders []string `yaml:"cors_allow_headers" json:"cors_allow_headers"`
CORSAllowMethods []string `yaml:"cors_allow_methods" json:"cors_allow_methods"`
// Rate limiting configuration
RateLimit int `yaml:"rate_limit" json:"rate_limit"`
RateLimitBurst int `yaml:"rate_limit_burst" json:"rate_limit_burst"`
RateLimitWindow time.Duration `yaml:"rate_limit_window" json:"rate_limit_window"`
// Request size limits
MaxRequestSize int64 `yaml:"max_request_size" json:"max_request_size"`
// SSE configuration
SSEEnabled bool `yaml:"sse_enabled" json:"sse_enabled"`
SSEConfig sse.Config `yaml:"sse_config" json:"sse_config"`
// Middleware configuration
EnableTracing bool `yaml:"enable_tracing" json:"enable_tracing"`
EnableMetrics bool `yaml:"enable_metrics" json:"enable_metrics"`
EnableRequestLogging bool `yaml:"enable_request_logging" json:"enable_request_logging"`
RequestTimeout time.Duration `yaml:"request_timeout" json:"request_timeout"`
// Validation configuration
StrictValidation bool `yaml:"strict_validation" json:"strict_validation"`
AllowUnknownFields bool `yaml:"allow_unknown_fields" json:"allow_unknown_fields"`
EnableSchemaValidation bool `yaml:"enable_schema_validation" json:"enable_schema_validation"`
}
Config holds API configuration options
func DefaultConfig ¶
func DefaultConfig() *Config
DefaultConfig returns sensible defaults for API configuration
type Services ¶
type Services struct {
// Core services
Bot service.BotService
Job service.JobService
Campaign common.CampaignService
Corpus common.CorpusService
Result service.ResultService
System service.SystemService
Monitoring service.MonitoringService
Reproducibility common.ReproducibilityService
CrashMinimizer common.CrashMinimizerService
Deduplication common.DeduplicationService
Analytics service.AnalyticsService
// Storage
Storage common.Storage
FileStorage common.FileStorage
// Repositories
BotRepo botRepo.AgentRepository
JobRepo jobRepo.JobRepository
CampaignRepo campaignRepo.CampaignRepository
CrashRepo crashRepo.CrashRepository
// Domain services
BotRegistry *registry.Service
Executor executor.Executor
}
Services represents the domain services needed by the API