package
0.0.0-20240805135859-79185c525adf
Repository: https://github.com/juaccrack/goapi.git
Documentation: pkg.go.dev

# Functions

CreateContact godoc @Summary Create a new contact @Description Create a new contact with the input payload @Tags contacts @Accept json @Produce json @Param contact body models.Contact true "Contact" @Success 201 {object} models.Contact @Failure 400 {object} models.ErrorResponse @Router /contacts [post].
DeleteContact godoc @Summary Delete a contact by ID @Description Delete a single contact by its ID @Tags contacts @Produce json @Param id path int true "Contact ID" @Success 200 {object} models.ErrorResponse @Failure 404 {object} models.ErrorResponse @Router /contacts/{id} [delete].
GetContact godoc @Summary Get a contact by ID @Description Get a single contact by its ID @Tags contacts @Produce json @Param id path int true "Contact ID" @Success 200 {object} models.Contact @Failure 404 {object} models.ErrorResponse @Router /contacts/{id} [get].
GetContacts godoc @Summary Get all contacts @Description Get a list of all contacts @Tags contacts @Produce json @Success 200 {array} models.Contact @Router /contacts [get].
UpdateContact godoc @Summary Update an existing contact @Description Update an existing contact by ID with the input payload @Tags contacts @Accept json @Produce json @Param id path int true "Contact ID" @Param contact body models.Contact true "Contact" @Success 200 {object} models.Contact @Failure 400 {object} models.ErrorResponse @Failure 404 {object} models.ErrorResponse @Router /contacts/{id} [put].