db

package
v0.0.0-...-f717e8e Latest Latest
Warning

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

Go to latest
Published: May 5, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const TaskList = "TaskList"

Variables

This section is empty.

Functions

This section is empty.

Types

type Status

type Status string
const (
	Completed Status = "Completed"
	Created   Status = "Created"
)

type Task

type Task struct {
	Id          int64
	Description string
	Status      Status
}

type Tasks

type Tasks struct {
	// contains filtered or unexported fields
}

func Create

func Create() (*Tasks, error)

func (*Tasks) Delete

func (db *Tasks) Delete(id int64) error

func (*Tasks) DeleteAll

func (db *Tasks) DeleteAll() error

func (*Tasks) Drop

func (db *Tasks) Drop() error

func (*Tasks) Insert

func (db *Tasks) Insert(taskDescription string) error

func (*Tasks) Query

func (db *Tasks) Query(id int64) (*Task, error)

func (*Tasks) QueryAll

func (db *Tasks) QueryAll() ([]Task, error)

func (*Tasks) Update

func (db *Tasks) Update(id int64, fieldToUpdate interface{}) (*Task, error)

Jump to

Keyboard shortcuts

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