tools

package
v2016.10.18+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2016 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddTodo

func AddTodo(tx *sql.Tx, title string, handle string, effectiveTimeNow time.Time) error

func CheckIn

func CheckIn(tx *sql.Tx, argv []string, handle string, effectiveTimeNow time.Time) error

func CloseAll

func CloseAll(tx *sql.Tx, effectiveTimeNow time.Time) error

func DurationRound

func DurationRound(unrounded time.Duration, rnd time.Duration, bias time.Duration) time.Duration

func GetTx

func GetTx(db *sql.DB) (*sql.Tx, error)

func ListLogEntries

func ListLogEntries(db *sql.DB, argv []string) error

func LogEntry

func LogEntry(tx *sql.Tx, argv []string, effectiveTimeNow time.Time) error

func OpenDB

func OpenDB(checkExists bool) (*sql.DB, error)

func ParseHandle

func ParseHandle(args []string) (string, []string)

func PrepareDB

func PrepareDB() error

func RollbackOnError

func RollbackOnError(tx *sql.Tx)

defer RollbackOnError(tx)

func Running

func Running(db *sql.DB, argv []string, extra string, effectiveTimeNow time.Time)

func ShowDays

func ShowDays(db *sql.DB, argv []string, rounding time.Duration, bias time.Duration) error

func ShowHeaders

func ShowHeaders(db *sql.DB) error

func ShowOrg

func ShowOrg(db *sql.DB, argv []string) error

func ShowTimes

func ShowTimes(db *sql.DB, argv []string, rounding time.Duration, bias time.Duration) (err error)

func ShowTodo

func ShowTodo(db *sql.DB, argv []string, handle string, limit int) error

func TodoDone

func TodoDone(tx *sql.Tx, argv []string, handle string, effectiveTimeNow time.Time) error

func TodoUndo

func TodoUndo(tx *sql.Tx, argv []string, handle string) error

func VerifyHandle

func VerifyHandle(db *sql.DB, handle string, fixit bool) (string, error)

func WithOpenDB

func WithOpenDB(checkExists bool, fn func(*sql.DB) error) error

func WithTransaction

func WithTransaction(fn func(*sql.DB, *sql.Tx) error) error

Types

type RowId

type RowId int64

func AddHeader

func AddHeader(tx *sql.Tx, header string, handle string, parent RowId, depth int) (RowId, error)

Jump to

Keyboard shortcuts

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