types

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TimePeriodWeek = "week"
)

Variables

This section is empty.

Functions

func GetShiftedTime

func GetShiftedTime(ts time.Time, direction TimeShiftDirection, duration TimeShiftDuration) time.Time

func HumanizeDuration

func HumanizeDuration(durationInSecs int) string

Types

type ActiveTaskDetails

type ActiveTaskDetails struct {
	TaskID            int
	TaskSummary       string
	CurrentLogBeginTS time.Time
	CurrentLogComment *string
}

type ActiveTaskLogEntry

type ActiveTaskLogEntry struct {
	ID          int
	TaskID      int
	TaskSummary string
	BeginTS     time.Time
	Comment     *string
}

type Task

type Task struct {
	ID             int
	Summary        string
	CreatedAt      time.Time
	UpdatedAt      time.Time
	TrackingActive bool
	SecsSpent      int
	Active         bool
	ListTitle      string
	ListDesc       string
}

func (Task) Description

func (t Task) Description() string

func (Task) FilterValue

func (t Task) FilterValue() string

func (Task) Title

func (t Task) Title() string

func (*Task) UpdateListDesc

func (t *Task) UpdateListDesc()

func (*Task) UpdateListTitle

func (t *Task) UpdateListTitle()

type TaskLogEntry

type TaskLogEntry struct {
	ID          int
	TaskID      int
	TaskSummary string
	BeginTS     time.Time
	EndTS       time.Time
	SecsSpent   int
	Comment     *string
	ListTitle   string
	ListDesc    string
}

func (TaskLogEntry) Description

func (tl TaskLogEntry) Description() string

func (TaskLogEntry) FilterValue

func (tl TaskLogEntry) FilterValue() string

func (*TaskLogEntry) GetComment

func (tl *TaskLogEntry) GetComment() string

func (TaskLogEntry) Title

func (tl TaskLogEntry) Title() string

func (*TaskLogEntry) UpdateListDesc

func (tl *TaskLogEntry) UpdateListDesc()

func (*TaskLogEntry) UpdateListTitle

func (tl *TaskLogEntry) UpdateListTitle()

type TaskReportEntry

type TaskReportEntry struct {
	TaskID      int
	TaskSummary string
	NumEntries  int
	SecsSpent   int
}

type TimePeriod

type TimePeriod struct {
	Start   time.Time
	End     time.Time
	NumDays int
}

func GetTimePeriod

func GetTimePeriod(period string, now time.Time, fullWeek bool) (TimePeriod, error)

type TimeShiftDirection

type TimeShiftDirection uint8
const (
	ShiftForward TimeShiftDirection = iota
	ShiftBackward
)

type TimeShiftDuration

type TimeShiftDuration uint8
const (
	ShiftMinute TimeShiftDuration = iota
	ShiftFiveMinutes
	ShiftHour
	ShiftDay
)

Jump to

Keyboard shortcuts

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