23 lines
476 B
Go
23 lines
476 B
Go
package transaction
|
|
|
|
import (
|
|
"RenewCMS/internal/domain/article"
|
|
"RenewCMS/internal/domain/author"
|
|
"RenewCMS/internal/domain/entry"
|
|
"RenewCMS/internal/domain/image"
|
|
"RenewCMS/internal/domain/site"
|
|
"context"
|
|
)
|
|
|
|
type Repositories struct {
|
|
Articles article.Repository
|
|
Sites site.Repository
|
|
Authors author.Repository
|
|
Entries entry.Repository
|
|
Images image.Repository
|
|
}
|
|
|
|
type Transactor interface {
|
|
Run(ctx context.Context, work func(Repositories) error) error
|
|
}
|