extract common create and updatelogic
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user