db

package
v0.0.0-...-f1391b6 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("not found")

Functions

This section is empty.

Types

type DB

type DB struct {
	*sql.DB
}

func Open

func Open(path string) (*DB, error)
func (db *DB) CreateQuicklink(name, url string) (Quicklink, error)

func (*DB) CreateTask

func (db *DB) CreateTask(title, date string) (Task, error)
func (db *DB) DeleteQuicklink(id int64) error

func (*DB) DeleteTask

func (db *DB) DeleteTask(id int64) error
func (db *DB) GetQuicklinks() ([]Quicklink, error)

func (*DB) GetTasks

func (db *DB) GetTasks(date string) ([]Task, error)

func (*DB) Migrate

func (db *DB) Migrate() error

func (*DB) ToggleTask

func (db *DB) ToggleTask(id int64) (bool, error)
type Quicklink struct {
	ID        int64  `json:"id"`
	Name      string `json:"name"`
	URL       string `json:"url"`
	CreatedAt string `json:"created_at"`
}

type Task

type Task struct {
	ID        int64  `json:"id"`
	Title     string `json:"title"`
	Completed bool   `json:"completed"`
	Date      string `json:"date"`
	CreatedAt string `json:"created_at"`
}

Jump to

Keyboard shortcuts

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