Refactor TED Calendar and EForm Structure for Enhanced Functionality

- Updated the GetOJS function to accept a base URL parameter, improving flexibility in constructing the calendar URL.
- Removed the deprecated eform.go file, streamlining the codebase by eliminating unused components.
- Introduced new eform structures for BusinessRegistrationInformationNotice, ContractNotice, ContractAwardNotice, and PriorInformationNotice, enhancing the handling of TED XML data.
- Implemented mapping functions to convert eform notices to the Tender entity, improving integration with the tender management system.
- Added a service layer to encapsulate business logic related to eform processing, adhering to Clean Architecture principles.
This commit is contained in:
n.nakhostin
2025-09-30 16:51:40 +03:30
parent 05c7eae8a2
commit 44f266189c
9 changed files with 574 additions and 336 deletions
+3 -3
View File
@@ -10,15 +10,15 @@ import (
)
const (
calendarUrl = "https://ted.europa.eu/en/release-calendar/-/download/file/CSV/%d"
calendarUrl = "%s/en/release-calendar/-/download/file/CSV/%d"
)
// Get OJS Number
func GetOJS(year int, date string) (string, error) {
func GetOJS(baseURL string, year int, date string) (string, error) {
var (
ojs string
)
url := fmt.Sprintf(calendarUrl, year)
url := fmt.Sprintf(calendarUrl, baseURL, year)
resp, err := http.Get(url)
if err != nil {