Files
query-orchestration/internal/queryProcessor/service.go
T

48 lines
833 B
Go
Raw Normal View History

2025-01-03 13:41:07 +00:00
package queryprocessor
import (
"context"
"queryorchestration/internal/result"
"github.com/google/uuid"
)
type Type int
const (
TypeJsonExtractor = iota
TypeContextFull
)
type Create struct {
Type Type
RequiredQueryIDs []uuid.UUID
2025-01-03 14:08:04 +00:00
Config string
2025-01-03 13:41:07 +00:00
}
type Update struct {
ID uuid.UUID
RequiredQueryIDs []uuid.UUID
2025-01-03 14:08:04 +00:00
Config string
2025-01-03 13:41:07 +00:00
}
type Query struct {
ID uuid.UUID
Type Type
Version int32
RequiredQueryIDs []uuid.UUID
2025-01-03 14:08:04 +00:00
Config string
2025-01-03 13:41:07 +00:00
}
type Creator interface {
Validate(ctx context.Context, entity *Create) error
}
type Updator interface {
2025-01-03 16:00:36 +00:00
Validate(ctx context.Context, current *Query, entity *Update) error
2025-01-03 13:41:07 +00:00
}
type Processor interface {
2025-01-06 15:31:39 +00:00
Process(ctx context.Context, query *Query, values []result.Value) (string, error)
2025-01-03 13:41:07 +00:00
}