summaryrefslogtreecommitdiff
path: root/internal/actions/timer.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/actions/timer.go')
-rw-r--r--internal/actions/timer.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/internal/actions/timer.go b/internal/actions/timer.go
index 58dbba2..5235a0a 100644
--- a/internal/actions/timer.go
+++ b/internal/actions/timer.go
@@ -11,7 +11,7 @@ import (
// PunchIn starts a timer for the specified client/project
// Use empty strings for client/project to use most recent entry
-func (a *actionsImpl) PunchIn(ctx context.Context, client, project, description string, billableRate *float64) (*TimerSession, error) {
+func (a *actions) PunchIn(ctx context.Context, client, project, description string, billableRate *float64) (*TimerSession, error) {
// If no client specified, delegate to PunchInMostRecent
if client == "" && project == "" {
session, err := a.PunchInMostRecent(ctx, description, billableRate)
@@ -119,7 +119,7 @@ func (a *actionsImpl) PunchIn(ctx context.Context, client, project, description
}
// PunchInMostRecent starts a timer copying the most recent time entry
-func (a *actionsImpl) PunchInMostRecent(ctx context.Context, description string, billableRate *float64) (*TimerSession, error) {
+func (a *actions) PunchInMostRecent(ctx context.Context, description string, billableRate *float64) (*TimerSession, error) {
// Get most recent entry
mostRecent, err := a.queries.GetMostRecentTimeEntry(ctx)
if err != nil {
@@ -219,7 +219,7 @@ func (a *actionsImpl) PunchInMostRecent(ctx context.Context, description string,
}
// PunchOut stops the active timer
-func (a *actionsImpl) PunchOut(ctx context.Context) (*TimerSession, error) {
+func (a *actions) PunchOut(ctx context.Context) (*TimerSession, error) {
stoppedEntry, err := a.queries.StopTimeEntry(ctx)
if err != nil {
if errors.Is(err, sql.ErrNoRows) {
@@ -264,7 +264,7 @@ func (a *actionsImpl) PunchOut(ctx context.Context) (*TimerSession, error) {
// Helper functions
-func (a *actionsImpl) createTimeEntry(ctx context.Context, clientID int64, projectID sql.NullInt64, description string, billableRate *float64) (*queries.TimeEntry, error) {
+func (a *actions) createTimeEntry(ctx context.Context, clientID int64, projectID sql.NullInt64, description string, billableRate *float64) (*queries.TimeEntry, error) {
var descParam sql.NullString
if description != "" {
descParam = sql.NullString{String: description, Valid: true}
@@ -339,4 +339,4 @@ func timeEntriesMatch(clientID int64, projectID sql.NullInt64, description strin
// regardless of what coalesced rate the active entry might have
return true
-} \ No newline at end of file
+}