MCPcopy Create free account
hub / github.com/SignTools/SignTools / jobResolver

Function jobResolver

main.go:423–432  ·  view source on GitHub ↗
(handler func(echo.Context, *storage.ReturnJob) error)

Source from the content-addressed store, hash-verified

421}
422
423func jobResolver(handler func(echo.Context, *storage.ReturnJob) error) func(c echo.Context) error {
424 return func(c echo.Context) error {
425 id := c.Param("id")
426 job, ok := storage.Jobs.GetById(id)
427 if !ok {
428 return c.NoContent(404)
429 }
430 return handler(c, job)
431 }
432}
433
434func getLastJob(c echo.Context) error {
435 if err := storage.Jobs.TakeLastJob(c.Response()); errors.Is(err, storage.ErrNotFound) {

Callers 1

serveFunction · 0.85

Calls 1

GetByIdMethod · 0.45

Tested by

no test coverage detected