models

package
v0.0.0-...-e96df23 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 14, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Todo

type Todo struct {
	ID   string
	Text string
	Done bool
}

func AllTodos

func AllTodos(db *sqlx.DB) ([]*Todo, error)

func CreateTodo

func CreateTodo(text string, db *sqlx.DB) (Todo, error)

func GetByID

func GetByID(id string, db *sqlx.DB) (Todo, error)

func (*Todo) DeleteTodo

func (todo *Todo) DeleteTodo(db *sqlx.DB) (Todo, error)

func (*Todo) MarkComplete

func (todo *Todo) MarkComplete(db *sqlx.DB) (Todo, error)

func (*Todo) UpdateTodo

func (todo *Todo) UpdateTodo(db *sqlx.DB) (Todo, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL