[v8.5.x] Backport 48550 to v8.5.x (#48656)
* resolve conflicts * update swagger docs
This commit is contained in:
+11
-1
@@ -249,9 +249,11 @@ type fakePluginClient struct {
|
||||
plugins.Client
|
||||
|
||||
req *backend.CallResourceRequest
|
||||
|
||||
backend.QueryDataHandlerFunc
|
||||
}
|
||||
|
||||
func (c *fakePluginClient) CallResource(ctx context.Context, req *backend.CallResourceRequest, sender backend.CallResourceResponseSender) error {
|
||||
func (c *fakePluginClient) CallResource(_ context.Context, req *backend.CallResourceRequest, sender backend.CallResourceResponseSender) error {
|
||||
c.req = req
|
||||
bytes, err := json.Marshal(map[string]interface{}{
|
||||
"message": "hello",
|
||||
@@ -266,3 +268,11 @@ func (c *fakePluginClient) CallResource(ctx context.Context, req *backend.CallRe
|
||||
Body: bytes,
|
||||
})
|
||||
}
|
||||
|
||||
func (c *fakePluginClient) QueryData(ctx context.Context, req *backend.QueryDataRequest) (*backend.QueryDataResponse, error) {
|
||||
if c.QueryDataHandlerFunc != nil {
|
||||
return c.QueryDataHandlerFunc.QueryData(ctx, req)
|
||||
}
|
||||
|
||||
return backend.NewQueryDataResponse(), nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user