kleinTodo/common/types.go
Darius klein 6e78c1948e
All checks were successful
build and deploy kleinTodo / build (push) Successful in 34s
Added update command
Updated delete logic
Added last modified and deleted to the todo item
2026-01-11 18:40:38 +01:00

37 lines
891 B
Go

package common
import "time"
type Credentials struct {
Username string `json:"username" toml:"username"`
Password string `json:"password" toml:"password"`
}
type Todo struct {
Name string `json:"name"`
Description string `json:"description"`
Status string `json:"status"`
Owner string `json:"owner"`
LastModified time.Time `json:"last_modified"`
Deleted bool `json:"deleted"`
}
type StoreTodoRequest struct {
Name string `json:"name"`
Description string `json:"description"`
Status string `json:"status"`
}
type TodoList struct {
Todos []Todo `json:"todos"`
}
type MisMatchingTodo struct {
ServerTodo Todo `json:"server_todo"`
LocalTodo Todo `json:"local_todo"`
}
type SyncResponse struct {
SyncedTodos []Todo `json:"synced_todos"`
MisMatchingTodos []MisMatchingTodo `json:"mismatching_todos"`
}