structs

package
v0.0.0-...-e48c819 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2019 License: MIT, Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//Db is database Instance
	Db *bolt.DB
)

Functions

func ConnectDb

func ConnectDb()

ConnectDb opens Database for transactions

func Delete

func Delete(id uint64) error

Delete a todo item from the todos bucket list

func Itob

func Itob(v int) []byte

Itob takes an int64 to bytes

func Savetodo

func Savetodo(item string) error

Savetodo add todo to the todos bucket list

func Updatetodo

func Updatetodo(key []byte) error

Updatetodo update the todo information

Types

type Todo

type Todo struct {
	Item     string
	Isdone   bool
	ID       uint64
	Datetime time.Time
}

Todo struct contains fields for todo items

func Gettodolist

func Gettodolist() ([]Todo, error)

Gettodolist get all uncompleted task from bucket list

Jump to

Keyboard shortcuts

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