summaryrefslogtreecommitdiff
path: root/internal/actions/types.go
diff options
context:
space:
mode:
authorT <t@tjp.lol>2025-08-05 11:37:02 -0600
committerT <t@tjp.lol>2025-08-05 11:37:08 -0600
commit665bd389a0a1c8adadcaa1122e846cc81f5ead31 (patch)
treef34f9ec77891308c600c680683f60951599429c3 /internal/actions/types.go
parentdc895cec9d8a84af89ce2501db234dff33c757e2 (diff)
WIP TUI
Diffstat (limited to 'internal/actions/types.go')
-rw-r--r--internal/actions/types.go31
1 files changed, 31 insertions, 0 deletions
diff --git a/internal/actions/types.go b/internal/actions/types.go
new file mode 100644
index 0000000..899583b
--- /dev/null
+++ b/internal/actions/types.go
@@ -0,0 +1,31 @@
+package actions
+
+import (
+ "errors"
+ "time"
+)
+
+// Common errors
+var (
+ ErrNoActiveTimer = errors.New("no active timer found")
+ ErrClientRequired = errors.New("client is required")
+ ErrClientNotFound = errors.New("client not found")
+ ErrProjectNotFound = errors.New("project not found")
+ ErrAmbiguousClient = errors.New("ambiguous client reference")
+ ErrAmbiguousProject = errors.New("ambiguous project reference")
+ ErrProjectClientMismatch = errors.New("project does not belong to specified client")
+ ErrNoRecentEntries = errors.New("no previous time entries found")
+)
+
+// TimerSession represents an active or completed time tracking session
+type TimerSession struct {
+ ID int64
+ ClientName string
+ ProjectName string // empty if no project
+ Description string // empty if no description
+ StartTime time.Time
+ EndTime *time.Time // nil if still active
+ Duration time.Duration
+ WasNoOp bool // true if timer was already active with same parameters
+ StoppedEntryID *int64 // ID of previously stopped entry (if any)
+} \ No newline at end of file