database

package
v0.0.0-...-3934c66 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2019 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ADJECTIVES = []string{}/* 1116 elements not displayed */
View Source
var NOUNS = []string{}/* 1525 elements not displayed */

Functions

func GetFunkyName

func GetFunkyName() string

Types

type Basket

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

Basket is a Connection struct for communicating between bolt db

func (*Basket) AddTask

func (c *Basket) AddTask(task models.Task) error

AddTask adds a task to the cloak DB

func (*Basket) Connect

func (c *Basket) Connect(cloakFolder string) error

Connect and make a db file if it does not exists

func (*Basket) GetTaskByName

func (c *Basket) GetTaskByName(app, name string) (models.Task, error)

GetTaskByName returns a single task for a given app nad name

func (*Basket) IsAppRegistered

func (c *Basket) IsAppRegistered(name string) bool

IsAppRegistered checks if the app is registered in the cloak DB so that there is a better structure pf task

func (*Basket) ListAllTasks

func (c *Basket) ListAllTasks() ([]models.Task, error)

ListAllTasks returns list of all tasks of all registered apps

func (*Basket) ListTasks

func (c *Basket) ListTasks(of string) ([]models.Task, error)

ListTasks returns list of tasks for a single app

func (*Basket) RegisterApp

func (c *Basket) RegisterApp(name string) error

RegisterApp registers an app in the cloak DB

func (*Basket) RemoveTask

func (c *Basket) RemoveTask(app, task string) error

RemoveTask removes a task completely from cloak DB

func (*Basket) UpdateTask

func (c *Basket) UpdateTask(task models.Task) error

UpdateTask updates a specific task with a new one passed by the parameter of this function

Jump to

Keyboard shortcuts

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