// Package handlers holds the REST endpoints and the shared Store that every // request handler — and, through graph.Resolver, every GraphQL resolver — // depends on. package handlers import ( "adam-french.co.uk/job-tracker/internal/services" "gorm.io/gorm" ) // Store is built once in main and passed around by pointer. type Store struct { DB *gorm.DB // JobLeads is the lead fetcher (services/job_leads.go). The GraphQL // resolvers use it to start a run and report on one. JobLeads *services.JobLeadService // Extractor reads a posting's page for the capture popup // (handle_job_capture.go). Extractor PostingExtractor // Bearer token for the browser capture routes (handle_job_capture.go), // generated from the settings page. Nil, or holding no token, means those // routes are switched off, not open. CaptureToken *services.CaptureToken }