kleinTodo/common/types.go
Darius klein ada2f0b760
All checks were successful
build and deploy kleinTodo / build (push) Successful in 35s
Cleanup + migrated to UUID usage
2026-01-12 21:22:46 +01:00

39 lines
977 B
Go

package common
import "time"
type Credentials struct {
Username string `json:"username" toml:"username"`
Password string `json:"password" toml:"password"`
}
type Todo struct {
Id string `json:"id" toml:"id"`
Name string `json:"name"`
Description string `json:"description"`
Status string `json:"status"`
Owner string `json:"owner"`
Labels []string `json:"labels"`
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"`
}