Documentation ¶
Index ¶
Constants ¶
View Source
const DEFAULT_SORTING_STRATEGY = "name_asc"
Variables ¶
View Source
var SortingStrategies = map[string]string{
"name_desc": "ORDER BY driver_last_name DESC, driver_first_name DESC, driver_patronymic DESC",
"name_asc": "ORDER BY driver_last_name ASC, driver_first_name ASC, driver_patronymic ASC",
}
Functions ¶
This section is empty.
Types ¶
type DriverEntity ¶
type PostDriverDto ¶
type Service ¶
type Service interface { GetDriver(id string) (*DriverEntity, error) GetDrivers(offset int, limit int, sort string) ([]DriverEntity, *int, error) AddDriver(driver PostDriverDto) (*DriverEntity, error) UpdateDriver(driver UpdateDriverDto) (*DriverEntity, error) DeleteDriver(id int) (*DriverEntity, error) }
type UpdateDriverDto ¶
type UpdateDriverDto struct { Id int `json:"id" validate:"min=1,nonzero"` LastName string `json:"lastName" validate:"min=1,max=255,regexp=^[a-zA-Zа-яА-Я]*$"` FirstName string `json:"firstName" validate:"min=1,max=255,regexp=^[a-zA-Zа-яА-Я]*$"` Patronymic string `json:"patronymic" validate:"min=1,max=255,regexp=^[a-zA-Zа-яА-Я]*$"` IsDisabled bool `json:"isDisabled" validate:"nonnil"` }
Click to show internal directories.
Click to hide internal directories.