31 lines
563 B
Go
31 lines
563 B
Go
package jsonextractor
|
|
|
|
import (
|
|
"context"
|
|
"queryorchestration/internal/database/repository"
|
|
queryprocessor "queryorchestration/internal/queryProcessor"
|
|
)
|
|
|
|
type Updator struct {
|
|
db *repository.Queries
|
|
}
|
|
|
|
func NewUpdator(db *repository.Queries) Updator {
|
|
return Updator{db}
|
|
}
|
|
|
|
func (s Updator) Validate(ctx context.Context, entity *queryprocessor.Update) error {
|
|
// TODO
|
|
return nil
|
|
}
|
|
|
|
func (s Updator) Update(ctx context.Context, entity *queryprocessor.Update) error {
|
|
err := s.Validate(ctx, entity)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
// TODO
|
|
return nil
|
|
}
|