models

package
v0.0.0-...-46e5d74 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2018 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)

DeleteTask deletes a task

func PutTask

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

PutTask puts a task into the db

Types

type Task

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

Task struct

type TaskCollection

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

TaskCollection is a collection of Tasks

func GetTasks

func GetTasks(db *sql.DB) TaskCollection

GetTasks gets all tasks from the database

Jump to

Keyboard shortcuts

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