MCPcopy Index your code
hub / github.com/apache/devlake / GetConnectionByName

Function GetConnectionByName

backend/plugins/webhook/api/connection.go:241–245  ·  view source on GitHub ↗

GetConnectionByName @Summary get webhook connection detail by name @Description Get webhook connection detail @Tags plugins/webhook @Success 200 {object} WebhookConnectionResponse @Failure 400 {string} errcode.Error "Bad Request" @Failure 500 {string} errcode.Error "Internal Error" @Router /plugi

(input *plugin.ApiResourceInput)

Source from the content-addressed store, hash-verified

239// @Failure 500 {string} errcode.Error "Internal Error"
240// @Router /plugins/webhook/connections/by-name/{connectionName} [GET]
241func GetConnectionByName(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error) {
242 connection := &models.WebhookConnection{}
243 err := connectionHelper.FirstByName(connection, input.Params)
244 return getConnection(err, connection)
245}
246
247func getConnection(err errors.Error, connection *models.WebhookConnection) (*plugin.ApiResourceOutput, errors.Error) {
248 if err != nil {

Callers

nothing calls this directly

Calls 2

getConnectionFunction · 0.85
FirstByNameMethod · 0.80

Tested by

no test coverage detected