Move QueryData method into backend plugin manager which HandleRequest uses to
query data from plugin SDK supported data sources. This allowed us to remove a lot
of code no longer needed.
Ref #21510
Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
(cherry picked from commit b3e9087557)
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
This commit is contained in:
co-authored by
Marcus Efraimsson
parent
57060a2276
commit
5fe040d26b
@@ -236,6 +236,12 @@ type DataPlugin interface {
|
||||
DataQuery(ctx context.Context, ds *models.DataSource, query DataQuery) (DataResponse, error)
|
||||
}
|
||||
|
||||
type DataPluginFunc func(ctx context.Context, ds *models.DataSource, query DataQuery) (DataResponse, error)
|
||||
|
||||
func (f DataPluginFunc) DataQuery(ctx context.Context, ds *models.DataSource, query DataQuery) (DataResponse, error) {
|
||||
return f(ctx, ds, query)
|
||||
}
|
||||
|
||||
func NewDataTimeRange(from, to string) DataTimeRange {
|
||||
return DataTimeRange{
|
||||
From: from,
|
||||
|
||||
Reference in New Issue
Block a user