models

package
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Session

type Session struct {
	StartTime time.Time         `json:"start_time"`
	EndTime   time.Time         `json:"end_time"`
	Name      config.SessType   `json:"name"`
	Tags      []string          `json:"tags"`
	Timeline  []SessionTimeline `json:"timeline"`
	Duration  time.Duration     `json:"duration"`
	Completed bool              `json:"completed"`
}

type SessionTimeline

type SessionTimeline struct {
	// StartTime is the start of the session including
	// the start of a paused session
	StartTime time.Time `json:"start_time"`
	// EndTime is the end of a session including
	// when a session is paused or stopped prematurely
	EndTime time.Time `json:"end_time"`
}

type Timer

type Timer struct {
	Opts       *config.TimerConfig `json:"opts"`
	PausedTime time.Time           `json:"paused_time"`
	StartTime  time.Time           `json:"start_time"`
	SessionKey time.Time           `json:"session_key"`
	WorkCycle  int                 `json:"work_cycle"`
}

func (*Timer) LogValue added in v1.4.1

func (t *Timer) LogValue() slog.Value

Jump to

Keyboard shortcuts

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