Versions in this module Expand all Collapse all v0 v0.0.6 Aug 19, 2023 v0.0.5 Aug 14, 2023 Changes in this version + func RunMigrateDown(db *sql.DB) error + func RunMigrateUp(db *sql.DB) error + type Beginner interface + BeginTx func(ctx context.Context, opts *sql.TxOptions) (*sql.Tx, error) + type DB struct + SqlDB *sql.DB + SqlxDB *sqlx.DB + func New(ctx context.Context, cfg *config.Config) (*DB, error) + func (d *DB) Close() + type Execer interface + ExecContext func(ctx context.Context, query string, args ...any) (sql.Result, error) + NamedExecContext func(ctx context.Context, query string, arg interface{}) (sql.Result, error) + type Preparer interface + PreparexContext func(ctx context.Context, query string) (*sqlx.Stmt, error) + type Queryer interface + GetContext func(ctx context.Context, dest interface{}, query string, args ...any) error + QueryRowxContext func(ctx context.Context, query string, args ...any) *sqlx.Row + QueryxContext func(ctx context.Context, query string, args ...any) (*sqlx.Rows, error) + SelectContext func(ctx context.Context, dest interface{}, query string, args ...any) error + type Repository struct + Clocker clock.Clocker + func (r *Repository) AddTask(ctx context.Context, db Execer, task *entity.Task) error + func (r *Repository) ListTasks(ctx context.Context, db Queryer) (entity.Tasks, error) v0.0.4 Jul 31, 2023 Changes in this version + var ErrNotFound = errors.New("not found") + var Tasks = &TaskStore + type TaskStore struct + LastID entity.TaskID + Tasks map[entity.TaskID]*entity.Task + func (ts *TaskStore) Add(t *entity.Task) (entity.TaskID, error) + func (ts *TaskStore) All() entity.Tasks