persistence

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2025 License: MIT Imports: 5 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) ([]d.SyncedWorklogEntry, error)

func FetchUnsyncedWLsFromDB added in v1.3.0

func FetchUnsyncedWLsFromDB(db *sql.DB) ([]d.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 InsertManualWLInDB added in v1.3.0

func InsertManualWLInDB(db *sql.DB, worklog d.ValidatedWorkLog) error

func InsertNewActiveWLInDB added in v1.3.0

func InsertNewActiveWLInDB(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