Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrRecordNotFound = errors.New("record not found") ErrDuplicatedKey = errors.New("duplicated key") )
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type Repository interface { Transaction(fn func(Repository) error) error TaskDao() TaskDao LogDao() LogDao }
func NewPgRepository ¶
func NewPgRepository(lg *zap.Logger, cfg config.PgConfig) Repository
type TaskDao ¶
type TaskDao interface { InsertTask(ctx context.Context, task do.Task) (do.Task, error) UpdateTask(ctx context.Context, task do.Task) (do.Task, error) GetTask(ctx context.Context, name string) (do.Task, error) GetTaskForUpdate(ctx context.Context, name string) (do.Task, error) }
func NewTaskDao ¶
Click to show internal directories.
Click to hide internal directories.