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, userID string, nt NewTask, now time.Time) (Task, error) + func (c Core) Delete(ctx context.Context, taskID string) error + func (c Core) QueryByID(ctx context.Context, taskID string) (Task, error) + func (c Core) QueryProjectTasks(ctx context.Context, projectID string, pageNumber, rowsPerPage int) ([]Task, error) + func (c Core) QueryWorkspaceTasks(ctx context.Context, workspaceID string, pageNumber, rowsPerPage int) ([]Task, error) + func (c Core) Update(ctx context.Context, taskID string, uc UpdateTask, now time.Time) error + type NewTask struct + EstimatedSeconds time.Duration + Name string + Pid string + TrackedSeconds time.Duration + Uid string + Wid string + type Task struct + Active bool + DateCreated time.Time + DateUpdated time.Time + EstimatedSeconds time.Duration + ID string + Name string + Pid string + TrackedSeconds time.Duration + Uid string + Wid string + type UpdateTask struct + Active *bool + EstimatedSeconds *time.Duration + Name *string + TrackedSeconds *time.Duration