Versions in this module Expand all Collapse all v0 v0.1.0 Jun 16, 2022 Changes in this version + type Store struct + func NewStore(log *zap.SugaredLogger, db *sqlx.DB) Store + func (s Store) Create(ctx context.Context, te TimeEntry) error + func (s Store) Delete(ctx context.Context, timeEntryID string) error + func (s Store) QueryActivity(ctx context.Context, userID string) ([]TimeEntry, error) + func (s Store) QueryByID(ctx context.Context, timeEntryID string) (TimeEntry, error) + func (s Store) QueryMostActive(ctx context.Context, userID string) ([]TimeEntry, error) + func (s Store) QueryProjectTime(ctx context.Context, projectID string) (TimeEntry, error) + func (s Store) QueryRange(ctx context.Context, userID string, pageNumber, rowsPerPage int, ...) ([]TimeEntry, error) + func (s Store) QueryRunning(ctx context.Context, userID string, pageNumber int, rowsPerPage int) ([]TimeEntry, error) + func (s Store) QueryTaskTime(ctx context.Context, taskID string) (TimeEntry, error) + func (s Store) Tran(tx sqlx.ExtContext) Store + func (s Store) Update(ctx context.Context, te TimeEntry) error + func (s Store) UpdateProjectTime(ctx context.Context, data dbp.Project) error + func (s Store) UpdateTaskTime(ctx context.Context, data db.Task) error + func (s Store) WithinTran(ctx context.Context, fn func(sqlx.ExtContext) error) error + 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 pq.StringArray + Tid string + Uid string + Wid string