db

package
v0.0.0-...-0212c3a Latest Latest
Warning

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

Go to latest
Published: Dec 2, 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)

CreateTask creates task in bucket and returns taskId, error

func DeleteTask

func DeleteTask(key int) error

DeleteTask delete tasks which id is 'key' and returns error

func Init

func Init(dbPath string) error

Init DB

Types

type Task

type Task struct {
	Key   int
	Value string
}

Task owns Key and Value

func AllTasks

func AllTasks() ([]Task, error)

AllTasks shows all the task in 'task' bucket, returns Task list and error

Jump to

Keyboard shortcuts

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