MCPcopy
hub / github.com/yusing/godoxy / ByProvider

Function ByProvider

internal/api/v1/route/by_provider.go:26–33  ·  view source on GitHub ↗

@x-id "byProvider" @BasePath /api/v1 @Summary List routes by provider @Description List routes by provider @Tags route @Accept json @Produce json @Success 200 {object} RoutesByProvider @Failure 403 {object} apitypes.ErrorResponse @Failure 500 {object} apitypes.ErrorResponse @Router /r

(c *gin.Context)

Source from the content-addressed store, hash-verified

24// @Failure 500 {object} apitypes.ErrorResponse
25// @Router /route/by_provider [get]
26func ByProvider(c *gin.Context) {
27 ep := entrypoint.FromCtx(c.Request.Context())
28 if ep == nil { // impossible, but just in case
29 c.JSON(http.StatusInternalServerError, apitypes.Error("entrypoint not initialized"))
30 return
31 }
32 c.JSON(http.StatusOK, ep.RoutesByProvider())
33}

Callers

nothing calls this directly

Calls 3

ContextMethod · 0.65
RoutesByProviderMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected