Files
query-orchestration/internal/query/result.go
T
Michael McGuinness 5f8c9c7b1d noctxrequired
2024-12-20 17:55:45 +00:00

16 lines
391 B
Go

package query
import (
"fmt"
jsonextractor "gotemplate/internal/jsonExtractor"
)
func (q *Queue) prepareResult(query Query, resultValues *[]ResultValue) (string, error) {
switch query.Type {
case QueryTypeJsonExtractor:
return jsonextractor.Process(query.ID, query.Version, (*resultValues)[0].Value)
default:
return "", fmt.Errorf("attempting to process invalid query type")
}
}