Add TED Scraper Configuration and Cron Scheduler Implementation

- Introduced a new configuration file for the TED scraper, defining database connection settings, logging preferences, and scraping parameters.
- Implemented a CronScheduler to manage scheduled tasks for TED operations, utilizing the robfig/cron library for scheduling.
- Added new entities and structures for handling TED XML data, including eForms and tender-related information, enhancing the scraper's functionality.
- Updated the main application to initialize the TED scraper with the new configuration and set up graceful shutdown handling.
- Removed the deprecated scraping implementation to streamline the codebase and focus on the new architecture.
This commit is contained in:
n.nakhostin
2025-09-30 16:03:53 +03:30
parent 0c50935c42
commit 05c7eae8a2
36 changed files with 3427 additions and 311 deletions
+96
View File
@@ -0,0 +1,96 @@
package eform
// =====================================================
// ENUMERATIONS AND CONSTANTS
// =====================================================
// Common CPV Code Prefixes (for validation)
const (
CPVWorks = "45" // Construction works
CPVServices = "50" // Services (general range 50-99 with exceptions)
)
// Common NUTS Code Structure
// NUTS codes are hierarchical: CC1234
// CC = Country code (2 chars)
// 1 = NUTS 1 level
// 12 = NUTS 2 level
// 123 = NUTS 3 level
// ISO 4217 Currency Codes (common ones)
const (
CurrencyEUR = "EUR" // Euro
CurrencyUSD = "USD" // US Dollar
CurrencyGBP = "GBP" // British Pound
CurrencySEK = "SEK" // Swedish Krona
CurrencyDKK = "DKK" // Danish Krone
CurrencyPLN = "PLN" // Polish Zloty
CurrencyCZK = "CZK" // Czech Koruna
CurrencyHUF = "HUF" // Hungarian Forint
CurrencyRON = "RON" // Romanian Leu
CurrencyBGN = "BGN" // Bulgarian Lev
CurrencyHRK = "HRK" // Croatian Kuna
)
// ISO 3166-1 Alpha-2 Country Codes (EU/EEA)
const (
CountryAT = "AT" // Austria
CountryBE = "BE" // Belgium
CountryBG = "BG" // Bulgaria
CountryCY = "CY" // Cyprus
CountryCZ = "CZ" // Czech Republic
CountryDE = "DE" // Germany
CountryDK = "DK" // Denmark
CountryEE = "EE" // Estonia
CountryES = "ES" // Spain
CountryFI = "FI" // Finland
CountryFR = "FR" // France
CountryGR = "GR" // Greece
CountryHR = "HR" // Croatia
CountryHU = "HU" // Hungary
CountryIE = "IE" // Ireland
CountryIT = "IT" // Italy
CountryLT = "LT" // Lithuania
CountryLU = "LU" // Luxembourg
CountryLV = "LV" // Latvia
CountryMT = "MT" // Malta
CountryNL = "NL" // Netherlands
CountryPL = "PL" // Poland
CountryPT = "PT" // Portugal
CountryRO = "RO" // Romania
CountrySE = "SE" // Sweden
CountrySI = "SI" // Slovenia
CountrySK = "SK" // Slovakia
CountryIS = "IS" // Iceland (EEA)
CountryLI = "LI" // Liechtenstein (EEA)
CountryNO = "NO" // Norway (EEA)
CountryGB = "GB" // United Kingdom
)
// ISO 639-1 Language Codes (EU official)
const (
LangBG = "BG" // Bulgarian
LangCS = "CS" // Czech
LangDA = "DA" // Danish
LangDE = "DE" // German
LangEL = "EL" // Greek
LangEN = "EN" // English
LangES = "ES" // Spanish
LangET = "ET" // Estonian
LangFI = "FI" // Finnish
LangFR = "FR" // French
LangGA = "GA" // Irish
LangHR = "HR" // Croatian
LangHU = "HU" // Hungarian
LangIT = "IT" // Italian
LangLT = "LT" // Lithuanian
LangLV = "LV" // Latvian
LangMT = "MT" // Maltese
LangNL = "NL" // Dutch
LangPL = "PL" // Polish
LangPT = "PT" // Portuguese
LangRO = "RO" // Romanian
LangSK = "SK" // Slovak
LangSL = "SL" // Slovenian
LangSV = "SV" // Swedish
)