Files
RenewCMS/internal/domain/transaction/transactionDomain.go
T

29 lines
700 B
Go

package transaction
import (
"RenewCMS/internal/domain/article"
"RenewCMS/internal/domain/author"
"RenewCMS/internal/domain/entry"
"RenewCMS/internal/domain/image"
"RenewCMS/internal/domain/localization"
"RenewCMS/internal/domain/site"
"context"
"errors"
)
var ErrLockContention = errors.New("the database could not lock the rows in time")
type Repositories struct {
Articles article.Repository
Sites site.Repository
Authors author.Repository
Entries entry.Repository
Images image.Repository
Localization localization.Repository
ArticleSEO article.SEOIndex
}
type Transactor interface {
Run(ctx context.Context, work func(Repositories) error) error
}