tracker

package
v0.0.0-...-bbd0b33 Latest Latest
Warning

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

Go to latest
Published: May 20, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// EntryIDStringFormat is the format used for Sprintf function to create the ID for database entry
	EntryIDStringFormat = "%v_%s"
	// EntryIDDateFormat is the date format used in the ID
	EntryIDDateFormat = "2006-01-02"
	// EntryIDNameReplaceOld is the string which is to be replaced by EntryIDNameReplaceNew
	EntryIDNameReplaceOld = " "
	// EntryIDNameReplaceNew is the string which replaces EntryIDNameReplaceOld
	EntryIDNameReplaceNew = ""

	// DBCallNoReturn is used when call to database times out
	DBCallNoReturn = "Call to DB did not return"
)

Variables

This section is empty.

Functions

func CreateID

func CreateID(appName string, date time.Time) string

CreateID creates an ID string using formatted date and string

func Start

func Start(o system.OS, db data.DB, cfg system.Config)

Start is the entrypoint function

Types

type Task

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

Task struct represents a running application.

func NewTask

func NewTask(appName string, recordedTime time.Time) *Task

NewTask creates a new task

func Ping

func Ping(o system.OS) *Task

Ping returns window information in the form of Task struct.

func (Task) AppName

func (t Task) AppName() string

AppName returns the title of current application

func (Task) Time

func (t Task) Time() time.Time

Time returns the capture Time

Jump to

Keyboard shortcuts

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