Documentation
¶
Index ¶
- type ErrorResponse
- type TaskHandler
- func (h *TaskHandler) CreateTask(w http.ResponseWriter, r *http.Request)
- func (h *TaskHandler) DeleteTask(w http.ResponseWriter, r *http.Request)
- func (h *TaskHandler) GetAllTasks(w http.ResponseWriter, r *http.Request)
- func (h *TaskHandler) GetTask(w http.ResponseWriter, r *http.Request)
- func (h *TaskHandler) UpdateTask(w http.ResponseWriter, r *http.Request)
- type ValidationError
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 ¶
ValidationError represents a field validation error
func (ValidationError) Error ¶
func (e ValidationError) Error() string
Click to show internal directories.
Click to hide internal directories.