Commit graph

4 commits

Author SHA1 Message Date
832364a06f Implement error types and sentinel errors
Add errors.go with:
- APIError struct with StatusCode, Message, RequestID, and Err fields
- Error() method for human-readable error messages
- Unwrap() method for errors.Is() and errors.As() compatibility
- Sentinel errors: ErrUnauthorized, ErrNotFound, ErrRateLimited,
  ErrBadRequest, ErrServerError
- NewAPIError helper function to create APIError from HTTP response
  with automatic status code mapping to sentinel errors

Closes checkvist-api-mnh
2026-01-14 13:23:48 +01:00
61431dfaeb Implement data models for Checkvist API entities
Add models.go with all data structures:
- Checklist struct with fields for ID, Name, Public, Archived, etc.
- Task struct with full task data including status, priority, due dates
- TaskStatus enum (StatusOpen, StatusClosed, StatusInvalidated)
- Note struct for task comments
- User struct for user information
- Tags type as map[string]bool for efficient lookup
- DueDate struct with smart syntax support and constructors
  (DueAt, DueString, DueInDays) and constants (DueToday, DueTomorrow,
  DueNextWeek, DueNextMonth)

Closes checkvist-api-e9p
2026-01-14 13:22:29 +01:00
7af39edcd1 Close ticket checkvist-api-5wr: Initialize Go module and project structure
Mark ticket as closed after successful implementation of:
- go.mod with module path code.beautifulmachines.dev/jakoubek/checkvist-api
- Placeholder Go files (client, checklists, tasks, notes, filter, models, errors, options)
- magefiles/ directory with separate Mage module
- testdata/ directory for test fixtures
- MIT LICENSE
2026-01-14 12:44:01 +01:00
3b076836d3 Initial commit 2026-01-14 12:42:00 +01:00