handler

package
v0.0.0-...-fe651ec Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorResponse

type ErrorResponse struct {
	Error     string `json:"error"`
	Code      string `json:"code"`
	Details   string `json:"details,omitempty"`
	Timestamp string `json:"timestamp"`
	RequestID string `json:"request_id,omitempty"`
}

ErrorResponse represents a structured error response

type TaskHandler

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

TaskHandler handles HTTP requests for task operations

func NewTaskHandler

func NewTaskHandler(store *store.MemoryStore) *TaskHandler

NewTaskHandler creates a new TaskHandler instance

func (*TaskHandler) CreateTask

func (h *TaskHandler) CreateTask(w http.ResponseWriter, r *http.Request)

CreateTask handles POST /tasks

func (*TaskHandler) DeleteTask

func (h *TaskHandler) DeleteTask(w http.ResponseWriter, r *http.Request)

DeleteTask handles DELETE /tasks/{id}

func (*TaskHandler) GetAllTasks

func (h *TaskHandler) GetAllTasks(w http.ResponseWriter, r *http.Request)

GetAllTasks handles GET /tasks

func (*TaskHandler) GetTask

func (h *TaskHandler) GetTask(w http.ResponseWriter, r *http.Request)

GetTask handles GET /tasks/{id}

func (*TaskHandler) UpdateTask

func (h *TaskHandler) UpdateTask(w http.ResponseWriter, r *http.Request)

UpdateTask handles PUT /tasks/{id}

type ValidationError

type ValidationError struct {
	Field   string
	Message string
}

ValidationError represents a field validation error

func (ValidationError) Error

func (e ValidationError) Error() string

Jump to

Keyboard shortcuts

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