Documentation ¶
Overview ¶
Package model manages DB interactions as well as validates input
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteTodo ¶
func DeleteTodo(todo_id uint)
DeleteTodo will delete the todo item with the given ID.
func GetAllTodoKinds ¶
GetAllTodoKinds returns a map of TodoKinds and their string representations.
func MarkDone ¶
func MarkDone(todo_id uint)
MarkDone will toggle the state of the todo item with the given ID.
func UpdateTodo ¶
func UpdateTodo(newTodoInfo TodoItem)
UpdateTodo will modify a todo of a given ID to match the passed TodoItem
Types ¶
type TodoItem ¶
TODO look at having this later be restricted on how long name and desc can be? - maybe name is no more than 200 chars TodoItem represents an item in our todo list
func GetAllTodos ¶
func GetAllTodos() []TodoItem
GetAllTodos returns all todos in the DB as a slice of TodoItems
func (TodoItem) GetValidKinds ¶
GetValidKinds returns a slice of all valid kinds of todos
func (TodoItem) IsInProgress ¶
IsInProgress returns true if the todo item is currently in progress