Documentation ¶
Index ¶
- type PGStorage
- func (s *PGStorage) AddTasks(ctx context.Context, tasks []*models.Task) ([]*models.Task, error)
- func (s *PGStorage) ArchivateTasks(ctx context.Context, tasks []*models.Task) error
- func (s *PGStorage) GetClosedTasks(ctx context.Context) ([]*models.Task, error)
- func (s *PGStorage) GetTaskByID(ctx context.Context, id int64) (*models.Task, error)
- func (s *PGStorage) GetTasksByTerm(ctx context.Context, term *models.Term) ([]*models.Task, error)
- func (s *PGStorage) GetTasksByTermAndLimits(ctx context.Context, term *models.Term, limit uint64, offset uint64) ([]*models.Task, error)
- func (s *PGStorage) UpdateTask(ctx context.Context, task *models.Task) (*models.Task, error)
- func (s *PGStorage) UpdateTaskStatus(ctx context.Context, id int64, closedAt *time.Time, reason string) (*models.Task, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PGStorage ¶
type PGStorage struct {
// contains filtered or unexported fields
}
PGStorage implements Storage with Postgres database
func NewStorage ¶
NewStorage constructs new PGStorage
func (*PGStorage) ArchivateTasks ¶
ArchivateTasks sets tasks as archived (soft delete)
func (*PGStorage) GetClosedTasks ¶
GetClosedTasks gets tasks by numeric term from table
func (*PGStorage) GetTaskByID ¶
GetTaskByID gets task by id
func (*PGStorage) GetTasksByTerm ¶
GetTasksByTerm gets tasks by numeric term from table
func (*PGStorage) GetTasksByTermAndLimits ¶
func (s *PGStorage) GetTasksByTermAndLimits(ctx context.Context, term *models.Term, limit uint64, offset uint64) ([]*models.Task, error)
GetTasksByTermAndLimits gets tasks with limit and offset
func (*PGStorage) UpdateTask ¶
UpdateTask sets editable task fields
Click to show internal directories.
Click to hide internal directories.