db

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: MIT Imports: 3 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 MakeDb

func MakeDb(path string) (Db, error)

func (*Db) AddTask

func (d *Db) AddTask(name, cmd string) error

func (*Db) DeleteTask

func (d *Db) DeleteTask(q string) error

func (*Db) DeleteTaskByName

func (d *Db) DeleteTaskByName(name string) error

func (*Db) GetAllTasks

func (d *Db) GetAllTasks() ([]Task, error)

func (*Db) GetTask

func (d *Db) GetTask(name string) (Task, bool)

func (*Db) Init

func (d *Db) Init() error

func (*Db) Truncate

func (d *Db) Truncate() error

func (*Db) UpdateTask

func (d *Db) UpdateTask(name, cmd string) error

type Task

type Task struct {
	Id       int
	Name     string
	Cmd      string
	LastUsed time.Time
}

Jump to

Keyboard shortcuts

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