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

Function getConnection

backend/plugins/webhook/api/connection.go:247–254  ·  view source on GitHub ↗
(err errors.Error, connection *models.WebhookConnection)

Source from the content-addressed store, hash-verified

245}
246
247func getConnection(err errors.Error, connection *models.WebhookConnection) (*plugin.ApiResourceOutput, errors.Error) {
248 if err != nil {
249 logger.Error(err, "query connection")
250 return nil, err
251 }
252 response, err := formatConnection(connection, true)
253 return &plugin.ApiResourceOutput{Body: response}, err
254}
255
256func formatConnection(connection *models.WebhookConnection, withApiKeyInfo bool) (*WebhookConnectionResponse, errors.Error) {
257 response := &WebhookConnectionResponse{WebhookConnection: *connection}

Callers 2

GetConnectionFunction · 0.85
GetConnectionByNameFunction · 0.85

Calls 2

formatConnectionFunction · 0.85
ErrorMethod · 0.65

Tested by

no test coverage detected