Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CityHandler ¶
type CityHandler struct {
// contains filtered or unexported fields
}
func NewCityHandler ¶
func NewCityHandler(service ICityService) (*CityHandler, error)
func (*CityHandler) GetFullCitiesHandler ¶
func (c *CityHandler) GetFullCitiesHandler(w http.ResponseWriter, r *http.Request)
GetFullCitiesHandler godoc
@Summary get all cities @Description get all cities @Tags city @Produce json @Success 200 {object} CityListResponse @Failure 405 {string} string @Failure 500 {string} string @Failure 222 {object} responses.ErrorResponse "Error" @Router /city/get_full [get]
func (*CityHandler) SearchCityHandler ¶
func (c *CityHandler) SearchCityHandler(w http.ResponseWriter, r *http.Request)
SearchCityHandler godoc
@Summary search city @Description search top 5 common named cities @Tags city @Produce json @Param searched query string true "searched string" @Success 200 {object} CityListResponse @Failure 405 {string} string @Failure 500 {string} string @Failure 222 {object} responses.ErrorResponse "Error" @Router /city/search [get]
type CityListResponse ¶
func NewCityListResponse ¶
func NewCityListResponse(body []*models.City) *CityListResponse
func (CityListResponse) MarshalEasyJSON ¶
func (v CityListResponse) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (CityListResponse) MarshalJSON ¶
func (v CityListResponse) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*CityListResponse) UnmarshalEasyJSON ¶
func (v *CityListResponse) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*CityListResponse) UnmarshalJSON ¶
func (v *CityListResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
Click to show internal directories.
Click to hide internal directories.