1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-19 01:45:58 +00:00

Implement ResultHandler as requested at: https://github.com/kataras/iris/issues/1465

Former-commit-id: 9d76c2f00766afd53cf6e591c25f861f179dd817
This commit is contained in:
Gerasimos (Makis) Maropoulos
2020-04-18 22:40:47 +03:00
parent 68c5883bce
commit dcf02480b3
7 changed files with 94 additions and 46 deletions

View File

@@ -6,6 +6,7 @@ import (
"github.com/kataras/iris/v12/context"
"github.com/kataras/iris/v12/core/host"
"github.com/kataras/iris/v12/core/router"
"github.com/kataras/iris/v12/hero"
)
type (
@@ -88,6 +89,9 @@ type (
//
// A shortcut for the `core/router#APIContainer`.
APIContainer = router.APIContainer
// ResultHandler describes the function type which should serve the "v" struct value.
// See `APIContainer.UseResultHandler`.
ResultHandler = hero.ResultHandler
// DirOptions contains the optional settings that
// `FileServer` and `Party#HandleDir` can use to serve files and assets.
// A shortcut for the `router.DirOptions`, useful when `FileServer` or `HandleDir` is being used.