TestConnection test ae connection @Summary test ae connection @Description Test AE Connection @Tags plugins/ae @Param body body models.AeConn true "json body" @Success 200 {object} shared.ApiBody "Success" @Failure 400 {string} errcode.Error "Bad Request" @Failure 500 {string} errcode.Error "Inte
(input *plugin.ApiResourceInput)
| 67 | // @Failure 500 {string} errcode.Error "Internal Error" |
| 68 | // @Router /plugins/ae/test [POST] |
| 69 | func TestConnection(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error) { |
| 70 | // decode |
| 71 | var err errors.Error |
| 72 | var connection models.AeConn |
| 73 | if err = api.Decode(input.Body, &connection, vld); err != nil { |
| 74 | return nil, errors.BadInput.Wrap(err, "could not decode request parameters") |
| 75 | } |
| 76 | result, err := testConnection(context.TODO(), connection) |
| 77 | if err != nil { |
| 78 | return nil, plugin.WrapTestConnectionErrResp(basicRes, err) |
| 79 | } |
| 80 | return &plugin.ApiResourceOutput{Body: result, Status: http.StatusOK}, nil |
| 81 | } |
| 82 | |
| 83 | // TestExistingConnection test ae connection |
| 84 | // @Summary test ae connection |
nothing calls this directly
no test coverage detected