Replaced chi v5 with gin

This commit is contained in:
Borna Rajković committed 2023-06-23 19:31:02 +02:00
1 parent 3df4c2dfaa
commit 484d60da70
8 files changed
+231 -294

No files matched your search

+9 -9
View File
@@ -16,16 +16,16 @@ type Holiday struct {
}
type Paging struct {
PageSize int
Page int
PageSize int `form:"page_size" binging:"min=0"`
Page int `form:"page" binging:"min=0"`
}
type Search struct {
Country string
Year *int
Date *time.Time
RangeStart *time.Time
RangeEnd *time.Time
StateHoliday *bool
ReligiousHoliday *bool
Country string `form:"country" binding:"len=2"`
Year *int `form:"year" binding:"omitempty,min=0"`
Date *time.Time `form:"date" time_format:"2006-01-02"`
RangeStart *time.Time `form:"range_start" time_format:"2006-01-02"`
RangeEnd *time.Time `form:"range_end" time_format:"2006-01-02"`
StateHoliday *bool `form:"state_holiday,omitempty"`
ReligiousHoliday *bool `form:"religious_holiday,omitempty"`
}