db

package
v0.0.0-...-8635785 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

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

func Open

func Open(opt Opt) (*DB, error)

func (*DB) Add

func (db *DB) Add(description string, snooze time.Duration) (Todo, error)

func (*DB) Delete

func (db *DB) Delete(id int) error

func (*DB) Get

func (db *DB) Get(id int) (t Todo, err error)

func (*DB) List

func (db *DB) List() ([]Todo, error)

func (*DB) Update

func (db *DB) Update(t Todo) error

type Opt

type Opt struct {
	Path string
}

type Todo

type Todo struct {
	ID          int
	Description string
	Due         time.Time
}

Jump to

Keyboard shortcuts

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