Documentation ¶
Index ¶
Constants ¶
View Source
const ( TaskStatusPending = "pending" TaskStatusDone = "done" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InMemoryTasksDB ¶
type InMemoryTasksDB struct {
// contains filtered or unexported fields
}
func NewInMemoryTasksDB ¶
func NewInMemoryTasksDB() *InMemoryTasksDB
func (*InMemoryTasksDB) AddTask ¶
func (db *InMemoryTasksDB) AddTask(task Task) error
func (*InMemoryTasksDB) DeleteTask ¶
func (db *InMemoryTasksDB) DeleteTask(id string) error
type TaskResponse ¶
type TaskResponse struct { ID string `json:"id"` OwnerID string `json:"ownerId"` Title string `json:"title"` Description string `json:"description"` Status string `json:"status"` }
func NewTaskResponse ¶
func NewTaskResponse(task Task) TaskResponse
type TasksDataSource ¶
type TasksHandler ¶
type TasksHandler struct {
// contains filtered or unexported fields
}
func NewTasksHandler ¶
func NewTasksHandler(ds TasksDataSource) *TasksHandler
func (*TasksHandler) DeleteTask ¶
func (h *TasksHandler) DeleteTask(c *gin.Context) error
Click to show internal directories.
Click to hide internal directories.