database

package
v0.0.0-...-5a557f3 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloseDb

func CloseDb()

Close db

func CreateDbStructure

func CreateDbStructure() error

Create the initial db structure

func GetDb

func GetDb() *sql.DB

Get the db handle from package

func InitDb

func InitDb()

Initialize db file

func IsDbInitiated

func IsDbInitiated() bool

Check if db file is created

func OpenDb

func OpenDb() (*sql.DB, error)

Open db

func ResetDb

func ResetDb()

Reset db Used in testing when using sqlite :memory: database

Types

type Tracking

type Tracking struct {
	Title    string
	Comment  string
	StartsAt time.Time
	StopsAt  time.Time
}

TODO: Move to other place

func CurrentTracking

func CurrentTracking() (Tracking, error)

func StartTracking

func StartTracking(projectTitle string) (Tracking, error)

Jump to

Keyboard shortcuts

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