MCPcopy Create free account
hub / github.com/Azure/peerd / fileHandler

Function fileHandler

pkg/handlers/root.go:85–87  ·  view source on GitHub ↗

fileHandler is a handler function for the /blob API @Summary Get a blob by URL @Param url path string true "The URL of the blob" @Success 200 {string} string "The blob content" @Failure 404 {string} string "Not Found" @Router /blobs/{url} [get]

(c *gin.Context)

Source from the content-addressed store, hash-verified

83// @Failure 404 {string} string "Not Found"
84// @Router /blobs/{url} [get]
85func fileHandler(c *gin.Context) {
86 fh.Handle(pcontext.FromContext(c))
87}

Callers

nothing calls this directly

Calls 1

HandleMethod · 0.80

Tested by

no test coverage detected