Versions in this module Expand all Collapse all v0 v0.1.0 Jun 16, 2022 Changes in this version + var ErrInvalidID = errors.New("ID is not in its proper form") + var ErrNotFound = errors.New("user not found") + type Core struct + func NewCore(log *zap.SugaredLogger, sqlxDB *sqlx.DB) Core + func (c Core) Create(ctx context.Context, nt NewTimeEntry, userID string, now time.Time) (TimeEntry, error) + func (c Core) Delete(ctx context.Context, timeEntryID string) error + func (c Core) QueryByID(ctx context.Context, timeEntryID string) (TimeEntry, error) + func (c Core) QueryDash(ctx context.Context, UserID string) ([]TimeEntry, error) + func (c Core) QueryRange(ctx context.Context, userID string, pageNumber, rowsPerPage int, ...) ([]TimeEntry, error) + func (c Core) QueryRunning(ctx context.Context, userID string, pageNumber int, rowsPerPage int) ([]TimeEntry, error) + func (c Core) Start(ctx context.Context, st StartTimeEntry, userID string, now time.Time) (TimeEntry, error) + func (c Core) Stop(ctx context.Context, TimeEntryID string, now time.Time) (TimeEntry, error) + func (c Core) SyncProjectTime(ctx context.Context, projectID string, now time.Time) error + func (c Core) SyncTaskTime(ctx context.Context, taskID string, now time.Time) error + func (c Core) Update(ctx context.Context, TimeEntryID string, ut UpdateTimeEntry, now time.Time) error + func (c Core) UpdateTags(ctx context.Context, TimeEntryID string, ut UpdateTimeEntryTags, now time.Time) error + type NewTimeEntry struct + Billable bool + CreatedWith string + Description string + DurOnly bool + Duration time.Duration + Pid string + Start time.Time + Stop time.Time + Tags []string + Tid string + Wid string + type StartTimeEntry struct + Billable bool + CreatedWith string + Description string + DurOnly bool + Pid string + Tags []string + Tid string + Wid string + type TimeEntry struct + Billable bool + CreatedWith string + DateCreated time.Time + DateUpdated time.Time + Description string + DurOnly bool + Duration time.Duration + ID string + Pid string + Start time.Time + Stop time.Time + Tags []string + Tid string + Uid string + Wid string + type UpdateTimeEntry struct + Billable *bool + CreatedWith *string + Description *string + DurOnly *bool + Start *time.Time + Stop *time.Time + Tags []string + type UpdateTimeEntryTags struct + TagMode string + Tags []string