MCPcopy Create free account
hub / github.com/authorizerdev/authorizer / TestEndpoint

Method TestEndpoint

internal/grpcsrv/handlers/admin.go:259–270  ·  view source on GitHub ↗

TestEndpoint delegates to service.TestEndpoint and projects the result. Makes an outbound HTTP call to the supplied endpoint. Requires super-admin auth.

(ctx context.Context, req *authorizerv1.TestEndpointRequest)

Source from the content-addressed store, hash-verified

257// TestEndpoint delegates to service.TestEndpoint and projects the result. Makes
258// an outbound HTTP call to the supplied endpoint. Requires super-admin auth.
259func (h *AdminHandler) TestEndpoint(ctx context.Context, req *authorizerv1.TestEndpointRequest) (*authorizerv1.TestEndpointResponse, error) {
260 res, _, err := h.Service.TestEndpoint(ctx, transport.MetaFromGRPC(ctx), &model.TestEndpointRequest{
261 Endpoint: req.GetEndpoint(),
262 EventName: req.GetEventName(),
263 EventDescription: req.EventDescription,
264 Headers: appDataToMap(req.GetHeaders()),
265 })
266 if err != nil {
267 return nil, err
268 }
269 return projectTestEndpointResponse(res), nil
270}
271
272// AddEmailTemplate delegates to service.AddEmailTemplate. design is optional.
273// Requires super-admin auth.

Callers

nothing calls this directly

Calls 7

MetaFromGRPCFunction · 0.92
appDataToMapFunction · 0.85
TestEndpointMethod · 0.65
GetEndpointMethod · 0.45
GetEventNameMethod · 0.45
GetHeadersMethod · 0.45

Tested by

no test coverage detected