models

package
v0.0.0-...-8e0749c Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2017 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteTask

func DeleteTask(db *sql.DB, id int) (int64, error)

func PostTask

func PostTask(db *sql.DB, name string) (int64, error)

func PutTask

func PutTask(db *sql.DB, task Task) (int64, error)

Types

type Task

type Task struct {
	ID   int    `json:"id"`
	Name string `json:"name"`
	Done bool   `json:"done"`
}

type TaskCollection

type TaskCollection struct {
	Tasks []Task `json:"items"`
}

func GetTasks

func GetTasks(db *sql.DB) TaskCollection

Jump to

Keyboard shortcuts

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