@@ -9,29 +9,60 @@ const DateFormat = "2006-01-02"
9
9
10
10
// Error codes
11
11
const (
12
- ErrCodeInvalidRequest = "INVALID_REQUEST"
13
- ErrCodeValidationFailed = "VALIDATION_FAILED"
14
- ErrCodeDatabaseError = "DATABASE_ERROR"
15
- ErrCodeNotFound = "NOT_FOUND"
16
- ErrCodeInvalidData = "INVALID_DATA"
12
+ ErrCodeInvalidRequest = "INVALID_REQUEST"
13
+ ErrCodeValidationFailed = "VALIDATION_FAILED"
14
+ ErrCodeDatabaseError = "DATABASE_ERROR"
15
+ ErrCodeNotFound = "NOT_FOUND"
16
+ ErrCodeInvalidData = "INVALID_DATA"
17
17
)
18
18
19
19
// Error messages
20
20
const (
21
- MsgInvalidRequestBody = "Invalid request body"
22
- MsgValidationFailed = "Validation failed"
23
- MsgInvalidStartDateFormat = "Invalid start date format. Use YYYY-MM-DD."
24
- MsgInvalidEndDateFormat = "Invalid end date format. Use YYYY-MM-DD."
25
- MsgEndDateAfterStartDate = "End date must be greater than start date."
26
- MsgStockNotFound = "Stock not found"
27
- MsgInvalidPurificationRate = "Invalid purification rate in database"
21
+ MsgInvalidRequestBody = "Invalid request body"
22
+ MsgValidationFailed = "Validation failed"
23
+ MsgInvalidStartDateFormat = "Invalid start date format. Use YYYY-MM-DD."
24
+ MsgInvalidEndDateFormat = "Invalid end date format. Use YYYY-MM-DD."
25
+ MsgEndDateAfterStartDate = "End date must be greater than start date."
26
+ MsgStockNotFound = "Stock not found"
27
+ MsgInvalidPurificationRate = "Invalid purification rate in database"
28
28
)
29
29
30
30
// Available years for stock data
31
31
var AvailableYears = []string {"2015" , "2016" , "2017" , "2018" , "2019" , "2020" , "2021" , "2022" , "2023" }
32
32
33
33
// Monitor titles
34
34
const (
35
- MonitorTitleAr = "لوحة مراقبة نقاء"
36
- MonitorTitleEn = "NAQA Monitoring Dashboard"
35
+ MonitorTitleAr = "لوحة مراقبة نقاء"
36
+ MonitorTitleEn = "NAQA Monitoring Dashboard"
37
+ )
38
+
39
+ // Error Messages
40
+ const (
41
+ ErrDatabaseConnection = "Database Connection Error"
42
+ ErrDataSeeding = "Error seeding data"
43
+ ErrInternalServer = "Internal Server Error"
44
+ ErrInvalidInput = "Invalid input data"
45
+ ErrNotFound = "Resource not found"
46
+ ErrUnauthorized = "Unauthorized access"
47
+ )
48
+
49
+ // Success Messages
50
+ const (
51
+ SuccessDataSeeded = "Data seeding completed successfully"
52
+ SuccessServerStarted = "Server started successfully"
53
+ SuccessHealthCheck = "Health check passed"
54
+ )
55
+
56
+ // Info Messages
57
+ const (
58
+ InfoSkippingSeeding = "Skipping data seeding (SEED_DATA is not set to 'true')"
59
+ InfoStartingSeeding = "Starting data seeding process..."
60
+ InfoServerStarting = "Server starting on port %s"
61
+ )
62
+
63
+ // Validation Messages
64
+ const (
65
+ ValidateRequiredField = "This field is required"
66
+ ValidateInvalidEmail = "Invalid email format"
67
+ ValidateInvalidInput = "Invalid input format"
37
68
)
0 commit comments