Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NotesController ¶
type NotesController struct { NotesUsecase domain.NotesUsecase Timeout time.Duration }
func (*NotesController) Create ¶
func (n *NotesController) Create(g *gin.Context)
Create handles the HTTP POST request for notes creation. @Summary Create a note @Description Create a note @Tags Notes @Accept json @Produce json @Param data body domain.NotesCreateRequest true "NotesCreateRequest" @Success 204 @Failure 400 {object} domain.HttpError @Failure 401 {object} domain.HttpError @Failure 500 {object} domain.HttpError @Router /notes/create [post]
@Security JWT
func (*NotesController) Delete ¶
func (n *NotesController) Delete(g *gin.Context)
Delete handles the HTTP DELETE request for notes removal. @Summary Delete a note @Description Delete a note @Tags Notes @Accept json @Produce json @Param data body domain.NotesDeleteRequest true "NotesDeleteRequest" @Success 204 "No Content" @Failure 400 {object} domain.HttpError @Failure 401 {object} domain.HttpError @Failure 403 {object} domain.HttpError @Failure 500 {object} domain.HttpError @Router /notes/delete [delete]
@Security JWT
func (*NotesController) List ¶
func (n *NotesController) List(g *gin.Context)
List handles the HTTP request for notes list. @Summary List notes @Description List notes @Tags Notes @Accept json @Produce json @Param id path string true "Machine ID" @Param page query int false "Page" @Success 200 {object} domain.NotesListResponse @Failure 401 {object} domain.HttpError @Failure 400 {object} domain.HttpError @Failure 500 {object} domain.HttpError @Router /notes/{id} [get]
@Security JWT
func (*NotesController) Update ¶
func (n *NotesController) Update(g *gin.Context)
Update handles the HTTP request for notes update. @Summary Update a note @Description Update a note @Tags Notes @Accept json @Produce json @Param data body domain.NotesUpdateRequest true "NotesUpdateRequest" @Success 200 @Failure 400 {object} domain.HttpError @Failure 401 {object} domain.HttpError @Failure 403 {object} domain.HttpError @Failure 500 {object} domain.HttpError @Router /notes/update [put]
@Security JWT