api

package
v0.0.0-...-961dd66 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 14, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TodoHandler

type TodoHandler struct {
	// contains filtered or unexported fields
}

TodoHandler API Actions

func NewTodoHandler

func NewTodoHandler(ch *todo.CommandHandler, qh *todo.QueryHandler) TodoHandler

NewTodoHandler creates a new TodoHandler

func (*TodoHandler) CreateHandler

func (h *TodoHandler) CreateHandler(c *gin.Context)

CreateHandler API @Summary Create Todo @Description Create a new Todo @Tags Write Todo @Accept json @Produce json @Router /create-todo [post] @Param command body todo.CreateTodo true "create todo" @Success 204 @Success 404 @Success 500

func (*TodoHandler) DeleteHandler

func (h *TodoHandler) DeleteHandler(c *gin.Context)

DeleteHandler API @Summary Delete Todo @Description Delete Todo @Tags Write Todo @Accept json @Produce json @Router /delete-todo [post] @Param command body todo.UndoTodo true "delete todo" @Success 204 @Success 404 @Success 500

func (*TodoHandler) DoHandler

func (h *TodoHandler) DoHandler(c *gin.Context)

DoHandler API @Summary Do Todo @Description Do Todo @Tags Write Todo @Accept json @Produce json @Router /do-todo [post] @Param command body todo.DoTodo true "do todo" @Success 204 @Success 404 @Success 500

func (*TodoHandler) GetHandler

func (h *TodoHandler) GetHandler(c *gin.Context)

GetHandler API @Summary Get Todo @Description Get Single Todo @Tags Read Todo @Accept json @Produce json @Router /todo/{id} [get] @Param id path string true "TodoID" @Success 200 {object} todo.TodoView @Success 404

func (*TodoHandler) ListHandler

func (h *TodoHandler) ListHandler(c *gin.Context)

ListHandler API @Summary List Todos @Description List all Todo @Tags Read Todo @Accept json @Produce json @Router /todo [get] @Success 200 {array} todo.TodoView @Success 404

func (*TodoHandler) UndoHandler

func (h *TodoHandler) UndoHandler(c *gin.Context)

UndoHandler API @Summary Undo Todo @Description Undo Todo @Tags Write Todo @Accept json @Produce json @Router /undo-todo [post] @Param command body todo.UndoTodo true "undo todo" @Success 204 @Success 404 @Success 500

func (*TodoHandler) UpdateHandler

func (h *TodoHandler) UpdateHandler(c *gin.Context)

UpdateHandler API @Summary Update Todo @Description Update Todo @Tags Write Todo @Accept json @Produce json @Router /update-todo [post] @Param command body todo.UpdateTodo true "update todo" @Success 204 @Success 404 @Success 500

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL