api

package
v0.0.0-...-a131ce6 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTaskAPI

func NewTaskAPI(router *httprouter.Router, tu domain.TaskUsecase, mid *middleware.Middleware, rc *reactor.Reactor)

Types

type CreateTaskRequest

type CreateTaskRequest struct {
	Title   string `json:"title"`
	Content string `json:"content"`
	Done    bool   `json:"done"`
}

type CreateTaskResponse

type CreateTaskResponse struct {
	Task *domain.Task `json:"task"`
}

type DeleteTaskByIDResponse

type DeleteTaskByIDResponse struct {
	Message string `json:"message"`
}

type GetAllTasksResponse

type GetAllTasksResponse struct {
	Metadata *domain.Metadata `json:"metadata"`
	Tasks    []*domain.Task   `json:"tasks"`
}

type GetTaskByIDResponse

type GetTaskByIDResponse struct {
	Task *domain.Task `json:"task"`
}

type UpdateTaskByIDRequest

type UpdateTaskByIDRequest struct {
	Title   string `json:"title,omitempty"`
	Content string `json:"content,omitempty"`
	Done    bool   `json:"done,omitempty"`
}

type UpdateTaskByIDResponse

type UpdateTaskByIDResponse struct {
	Task *domain.Task `json:"updated_task"`
}

Jump to

Keyboard shortcuts

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