persistence

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DBVersion = "1"
)

Variables

View Source
var (
	ErrNoTaskIsActive           = errors.New("no task is active")
	ErrCouldntStopActiveTask    = errors.New("couldn't stop active task")
	ErrCouldntStartTrackingTask = errors.New("couldn't start tracking task")
)

Functions

func DeleteActiveLogInDB

func DeleteActiveLogInDB(db *sql.DB) error

func DeleteWLInDB

func DeleteWLInDB(db *sql.DB, id int) error

func FetchSyncedWLsFromDB

func FetchSyncedWLsFromDB(db *sql.DB) ([]c.SyncedWorklogEntry, error)

func FetchWLsFromDB

func FetchWLsFromDB(db *sql.DB) ([]c.WorklogEntry, error)

func GetActiveIssueFromDB

func GetActiveIssueFromDB(db *sql.DB) (string, error)

func GetDB

func GetDB(dbpath string) (*sql.DB, error)

func InitDB

func InitDB(db *sql.DB) error

func InsertNewWLInDB

func InsertNewWLInDB(db *sql.DB, issueKey string, beginTS time.Time) error

func QuickSwitchActiveWLInDB

func QuickSwitchActiveWLInDB(db *sql.DB, currentIssue, selectedIssue string, currentTime time.Time) error

func StopCurrentlyActiveWLInDB

func StopCurrentlyActiveWLInDB(db *sql.DB, issueKey string, endTS time.Time) error

func UpdateActiveWLBeginTSAndCommentInDB

func UpdateActiveWLBeginTSAndCommentInDB(db *sql.DB, beginTS time.Time, comment string) error

func UpdateActiveWLBeginTSInDB

func UpdateActiveWLBeginTSInDB(db *sql.DB, beginTS time.Time) error

func UpdateActiveWLInDB

func UpdateActiveWLInDB(db *sql.DB, issueKey, comment string, beginTS, endTS time.Time) error

func UpdateSyncStatusAndCommentForWLInDB

func UpdateSyncStatusAndCommentForWLInDB(db *sql.DB, id int, comment string) error

func UpdateSyncStatusForWLInDB

func UpdateSyncStatusForWLInDB(db *sql.DB, id int) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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