Documentation ¶
Index ¶
- type Handler
- func (h *Handler) AllPersons(c *gin.Context)
- func (h *Handler) AllRegions(c *gin.Context)
- func (h *Handler) CreateRegion(c *gin.Context)
- func (h *Handler) DeletePerson(c *gin.Context)
- func (h *Handler) DeleteRegion(c *gin.Context)
- func (h *Handler) NewPerson(c *gin.Context)
- func (h *Handler) Person(c *gin.Context)
- func (h *Handler) Residents(c *gin.Context)
- func (h *Handler) UpdatePerson(c *gin.Context)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
func (*Handler) AllPersons ¶
AllPersons godoc @Summary Get all persons @Description Get all persons @ID get-all-persons @Success 200 {object} Person @Produce json @Router /person [get]
func (*Handler) AllRegions ¶
AllRegions godoc @Summary Get all regions @Description Get all regions @ID get-all-regions @Success 200 {object} Region @Produce json @Router /region [get]
func (*Handler) CreateRegion ¶
CreateRegion godoc @Summary Create a region @Description Create a region @ID create-region @Accept json @Produce json @Param region body Region true "Region" @Success 200 {object} Region @Router /region [post]
func (*Handler) DeletePerson ¶
DeletePerson godoc @Summary Delete a person @Description Delete a person @ID delete-person @Produce json @Param id path int true "Person ID" @Success 200 {object} Person @Failure 400 {object} error @Router /person/{id} [delete]
func (*Handler) DeleteRegion ¶
DeleteRegion godoc
@Summary Delete a region @Description Delete a region @ID delete-region @Produce json @Param id path int true "Region ID" @Success 200 {object} Region @Router /region/{id} [delete]
func (*Handler) NewPerson ¶
NewPerson godoc @Summary Create a person @Description Create a person @ID create-person @Accept json @Produce json @Param person body Person true "Person" @Success 200 {object} Person @Failure 400 {object} error @Router /person [post]
func (*Handler) Person ¶
Person godoc @Summary Get a person @Description Get a person @ID get-person @Produce json @Param id path int true "Person ID" @Success 200 {object} Person @Failure 400 {object} error @Router /person/{id} [get]
func (*Handler) Residents ¶
Residents godoc @Summary Get a residents @Description Get a residents @ID get-region @Produce json @Param id path int true "Region ID" @Success 200 {object} Region @Router person/region/{id} [get]
func (*Handler) UpdatePerson ¶
UpdatePerson godoc @Summary Update a person @Description Update a person @ID update-person @Accept json @Produce json @Param id path int true "Person ID" @Param person body Person true "Person" @Success 200 {object} Person @Failure 400 {object} error @Router /person/{id} [put]