ttt

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2022 License: BSD-3-Clause Imports: 6 Imported by: 0

README

ttt - time tracking terminal

Go Reference Build Status Go Report Card GitHub release

ttt allows you to track your working hours, and generates simple reports.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ActiveRecordExistsError = errors.New("active record already exists")
	NoActiveRecordError     = errors.New("no active record exists")
)

Functions

This section is empty.

Types

type BusinessDay

type BusinessDay struct {
	ISOWeek     int
	Date        time.Time
	WorkedHours time.Duration
	WorkHours   time.Duration
}

type Record

type Record struct {
	Start *time.Time
	End   *time.Time
	// contains filtered or unexported fields
}

func (*Record) Active

func (r *Record) Active() bool

type TimeTrackingDb

type TimeTrackingDb struct {
	// contains filtered or unexported fields
}

func CreateDb

func CreateDb(filename string) (*TimeTrackingDb, error)

func LoadDb

func LoadDb(filename string) (*TimeTrackingDb, error)

func (*TimeTrackingDb) Close

func (t *TimeTrackingDb) Close() error

func (*TimeTrackingDb) EndRecord

func (t *TimeTrackingDb) EndRecord(dts time.Time) error

func (*TimeTrackingDb) GetBusinessDays

func (t *TimeTrackingDb) GetBusinessDays(from, to time.Time) ([]BusinessDay, error)

func (*TimeTrackingDb) GetCurrentRecord

func (t *TimeTrackingDb) GetCurrentRecord() (Record, error)

func (*TimeTrackingDb) StartRecord

func (t *TimeTrackingDb) StartRecord(dts time.Time) error

Directories

Path Synopsis
cmd
ttt

Jump to

Keyboard shortcuts

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