db

package
v0.0.0-...-c90603e Latest Latest
Warning

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

Go to latest
Published: May 5, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateTask

func CreateTask(task string) (int, error)

Creates task and stores it as a byteslice bucket in bolt.db

func DeleteTask

func DeleteTask(key int) error

Delete a task

func Init

func Init(dbPath string) error

Initiates bolt.db, updates db with new or existing bucket Caution: Init is not init. The function is not package level.

Types

type Task

type Task struct {
	Key   int
	Value string
}

func AllTasks

func AllTasks() ([]Task, error)

Read all tasks in db.

Jump to

Keyboard shortcuts

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