repo

package
v0.0.0-...-86f3bae Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddStart

func AddStart(start Capture) error

func AddStop

func AddStop(stop Capture) error

func DeleteProject

func DeleteProject(ID string) error

func SaveProject

func SaveProject(project Project) error

func SetLatestStop

func SetLatestStop(stop Capture) error

Types

type Capture

type Capture struct {
	ID        string
	Timestamp int64
}

type CaptureFile

type CaptureFile struct {
	ID     string
	Starts []int64
	Stops  []int64
}

func GetAllCaptures

func GetAllCaptures() ([]CaptureFile, error)

type Project

type Project struct {
	Closed      bool
	Description string
	ID          string
}

func GetProject

func GetProject(ID string) (Project, error)

func GetProjectList

func GetProjectList() ([]Project, error)

type ReportCapturesCapture

type ReportCapturesCapture struct {
	ID                  string
	NumberOfTimesWorked int64
	TimeWorked          int64
	TimeWorkedDisplay   string
}

type ReportCapturesList

type ReportCapturesList struct {
	Projects []ReportCapturesCapture
}

func GetMonthCaptures

func GetMonthCaptures() (ReportCapturesList, error)

func GetReportCaptures

func GetReportCaptures(timespan TimeSpan) (ReportCapturesList, error)

func GetTodayCaptures

func GetTodayCaptures() (ReportCapturesList, error)

type TimeSpan

type TimeSpan struct {
	From time.Time
	To   time.Time
}

func TimeSpanDay

func TimeSpanDay(t time.Time) TimeSpan

func TimeSpanMonth

func TimeSpanMonth(t time.Time) TimeSpan

Jump to

Keyboard shortcuts

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