Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContactController ¶
type ContactController struct {
// contains filtered or unexported fields
}
func NewContactController ¶
func NewContactController( persistentDbSvc *db.PersistentDatabaseService, ) *ContactController
func (*ContactController) Create ¶
func (controller *ContactController) Create(c echo.Context) error
CreateContact godoc @Summary CreateNewContact @Description Create a new contact. @Tags contact @Accept json @Produce json @Param createContactDto body dto.CreateContact true "NewContact" @Success 201 {object} object{} "ContactCreated" @Router /v1/contact/ [post]
func (*ContactController) Delete ¶
func (controller *ContactController) Delete(c echo.Context) error
DeleteContact godoc @Summary DeleteContact @Description Delete a contact. @Tags contact @Accept json @Produce json @Param id path string true "ContactId" @Success 200 {object} object{} "ContactDeleted" @Router /v1/contact/{id}/ [delete]
func (*ContactController) Read ¶
func (controller *ContactController) Read(c echo.Context) error
ReadContacts godoc @Summary ReadContacts @Description List contacts. @Tags contact @Accept json @Produce json @Success 200 {array} entity.Contact @Router /v1/contact/ [get]
func (*ContactController) Update ¶
func (controller *ContactController) Update(c echo.Context) error
UpdateContact godoc @Summary UpdateContact @Description Update a contact. @Tags contact @Accept json @Produce json @Param updateContactDto body dto.UpdateContact true "UpdateContact (Only id is required.)" @Success 200 {object} object{} "ContactUpdated" @Router /v1/contact/ [put]