extract common create and updatelogic

This commit is contained in:
Michael McGuinness
2025-01-03 16:00:36 +00:00
parent 9f505dd94c
commit 0447ec4c4b
9 changed files with 24 additions and 72 deletions
+1 -3
View File
@@ -36,12 +36,10 @@ type Query struct {
type Creator interface {
Validate(ctx context.Context, entity *Create) error
Create(ctx context.Context, entity *Create) (uuid.UUID, error)
}
type Updator interface {
Validate(ctx context.Context, entity *Update) error
Update(ctx context.Context, entity *Update) error
Validate(ctx context.Context, current *Query, entity *Update) error
}
type Processor interface {