dbal

package
v0.0.0-...-6f62ada Latest Latest
Warning

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

Go to latest
Published: May 7, 2022 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Db *sql.DB = nil

Functions

func GetMigrationVersion

func GetMigrationVersion() (int, error)

func SetMigrationVersion

func SetMigrationVersion(version int) error

func TruncateTodos

func TruncateTodos() error

Types

type Project

type Project struct {
	Id        int64
	Name      string
	CreatedAt time.Time
}

func GetProjectById

func GetProjectById(id int64) (Project, error)

func GetProjectByName

func GetProjectByName(name string) (Project, error)

func GetProjects

func GetProjects() ([]Project, error)

func (Project) Add

func (project Project) Add() (int64, error)

func (Project) GetTodos

func (project Project) GetTodos(onlyCheckInactive bool) ([]Todo, error)

func (Project) Remove

func (project Project) Remove() error

type Todo

type Todo struct {
	Id          int64
	State       int16
	Title       string
	Description string
	Priority    int16
	CreatedAt   time.Time
	CompletedAt time.Time
	DueAt       time.Time
	Project     Project
}

func GetTodoById

func GetTodoById(id int64) (Todo, error)

func GetTodoByTitle

func GetTodoByTitle(title string, projectName string, checkInactive bool) (Todo, error)

func (Todo) Add

func (todo Todo) Add() (int64, error)

func (Todo) ChangeState

func (todo Todo) ChangeState(state int16) error

func (Todo) Remove

func (todo Todo) Remove() error

Jump to

Keyboard shortcuts

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