package
Version:
v0.0.0-...-ae59dd0
Opens a new window with list of versions in this module.
Published: Aug 6, 2024
License: MIT
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package database contains the database logic
AddTodo injects a todo into the database
DeleteTodos removes a todo from the database
InitDb initializes the DB and creates the schema
type Todo struct {
ID int `db:"ID"`
Title string `db:"TITLE"`
Completed bool `db:"COMPLETED"`
}
Todo struct must contain the attributes and they should match the schema
TodoList is a list of Todos
GetTodos returns a List of Todos from the database
Source Files
¶
Click to show internal directories.
Click to hide internal directories.