db

package
v0.0.0-...-9e33ccf Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close()

func CreateTask

func CreateTask(taskValue string) (int, error)

Returns the key of the task

func DeleteTask

func DeleteTask(key int) error

func Init

func Init(dbPath string) error

func MarkCompleted

func MarkCompleted(key int) error

Types

type Task

type Task struct {
	Key       int
	Value     string
	Completed bool
	Created   time.Time
}

func GetAllTasks

func GetAllTasks() ([]Task, error)

TODO: function to filter out completed tasks?

func GetCompletedTasks

func GetCompletedTasks() ([]Task, error)

func GetUncompletedTasks

func GetUncompletedTasks() ([]Task, error)

func (*Task) String

func (t *Task) String() string

Jump to

Keyboard shortcuts

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