db

package
v0.0.0-...-361378c Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddTask

func AddTask(task string) (int, error)

AddTask add a task to the db

func CompleteTask

func CompleteTask(key int, prevValue string, updateTime time.Time) error

CompleteTask updates the time when the task is completed

func DeleteTask

func DeleteTask(key int) error

DeleteTask deletes a particular user task

func Init

func Init(dbPath string) error

Init initialises a db at path 'dbPath'

Types

type Task

type Task struct {
	Key       int
	Value     string
	Completed string
}

Task template for user tasks

func AllTasks

func AllTasks() ([]Task, error)

AllTasks list all the user tasks

func GetCompletedTasksForToday

func GetCompletedTasksForToday() ([]Task, error)

GetCompletedTasksForToday returns the list of tasks completed today

Jump to

Keyboard shortcuts

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