Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Router ¶
Router configuration for the REST API
func NewRouter ¶
func NewRouter(config RouterConfig) *Router
NewRouter creates a new API router with all routes configured
type RouterConfig ¶
type RouterConfig struct {
Logger *zap.Logger
DomainService *service.DomainService
UserService *service.UserService
AliasService *service.AliasService
MailboxService *service.MailboxService
MessageService *service.MessageService
PhishingService *phishing.PhishingDetectionService
QueueService *service.QueueService
SetupService *service.SetupService
SettingsService *service.SettingsService
PGPService *service.PGPService
AuditService *service.AuditService
WebhookService *service.WebhookService
ContactService *contactService.ContactService
AddressbookService *contactService.AddressbookService
CalendarService *calendarService.CalendarService
EventService *calendarService.EventService
AuditorService *repService.AuditorService
ScoresRepo repRepository.ScoresRepository
EventsRepo repRepository.EventsRepository
CircuitRepo repRepository.CircuitBreakerRepository
// Phase 5 repositories
DMARCRepo repRepository.DMARCReportsRepository
ARFRepo repRepository.ARFReportsRepository
PostmasterRepo repRepository.PostmasterMetricsRepository
SNDSRepo repRepository.SNDSMetricsRepository
ProviderLimitsRepo repRepository.ProviderRateLimitsRepository
WarmupRepo repRepository.CustomWarmupRepository
PredictionsRepo repRepository.PredictionsRepository
AlertsRepo repRepository.AlertsRepository
// Phase 5 services
DMARCAnalyzer *repService.DMARCAnalyzerService
ARFParser *repService.ARFParserService
GmailPostmaster *repService.GmailPostmasterService
MicrosoftSNDS *repService.MicrosoftSNDSService
ProviderLimits *repService.ProviderRateLimitsService
CustomWarmup *repService.CustomWarmupService
Predictions *repService.PredictionsService
Alerts *repService.AlertsService
APIKeyRepo repository.APIKeyRepository
RateLimitRepo repository.RateLimitRepository
DB *sql.DB
JWTSecret string
CORSOrigins []string
WebUIConfig *config.WebUIConfig
}
RouterConfig contains dependencies for the API router
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server represents the admin API HTTP server
func NewServer ¶
func NewServer( cfg *config.APIConfig, fullConfig *config.Config, configPath string, db *database.DB, domainRepo repository.DomainRepository, userRepo repository.UserRepository, aliasRepo repository.AliasRepository, mailboxRepo repository.MailboxRepository, messageRepo repository.MessageRepository, queueRepo repository.QueueRepository, apiKeyRepo repository.APIKeyRepository, rateLimitRepo repository.RateLimitRepository, webhookRepo repository.WebhookRepository, contactService *contactService.ContactService, addressbookService *contactService.AddressbookService, calendarService *calendarService.CalendarService, eventService *calendarService.EventService, telemetryService *repService.TelemetryService, auditorService *repService.AuditorService, reputationDB interface { GetEventRepo() repRepository.EventsRepository GetScoresRepo() repRepository.ScoresRepository GetCircuitBreakerRepo() repRepository.CircuitBreakerRepository }, logger *zap.Logger, ) *Server
NewServer creates a new admin API server This is a wrapper around NewRouter for backward compatibility
Click to show internal directories.
Click to hide internal directories.