From 8e587fecdfaca1f98609b113c8c91e23cc5163ca Mon Sep 17 00:00:00 2001 From: Alexander Zobnin Date: Fri, 5 Mar 2021 13:38:44 +0300 Subject: [PATCH] Update function def model --- pkg/datasource/models.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/pkg/datasource/models.go b/pkg/datasource/models.go index b2291e1..f5e9204 100644 --- a/pkg/datasource/models.go +++ b/pkg/datasource/models.go @@ -85,8 +85,15 @@ type QueryFunction struct { // QueryOptions model type QueryFunctionDef struct { - Name string `json:"name"` - Category string `json:"category"` + Name string `json:"name"` + Category string `json:"category"` + Params []QueryFunctionParamDef `json:"params"` + DefaultParams []string `json:"defaultParams"` +} + +type QueryFunctionParamDef struct { + Name string `json:"name"` + Type string `json:"type"` } // ReadQuery will read and validate Settings from the DataSourceConfg