aliases.go 1.2 KB

123456789101112131415161718192021222324252627282930313233
  1. package mvc
  2. import (
  3. "github.com/kataras/iris/v12/hero"
  4. "github.com/kataras/iris/v12/versioning"
  5. )
  6. type (
  7. // Result is a type alias for the `hero#Result`, useful for output controller's methods.
  8. Result = hero.Result
  9. // Response is a type alias for the `hero#Response`, useful for output controller's methods.
  10. Response = hero.Response
  11. // View is a type alias for the `hero#View`, useful for output controller's methods.
  12. View = hero.View
  13. // Code is a type alias for the `hero#Code`, useful for
  14. // http error handling in controllers.
  15. // This can be one of the input parameters of the `Controller.HandleHTTPError`.
  16. Code = hero.Code
  17. // Err is a type alias for the `hero#Err`.
  18. // It is a special type for error stored in mvc responses or context.
  19. // It's used for a builtin dependency to map the error given by a previous
  20. // method or middleware.
  21. Err = hero.Err
  22. // DeprecationOptions describes the deprecation headers key-values.
  23. // Is a type alias for the `versioning#DeprecationOptions`.
  24. //
  25. // See `Deprecated` package-level option.
  26. DeprecationOptions = versioning.DeprecationOptions
  27. )
  28. // Try is a type alias for the `hero#Try`,
  29. // useful to return a result based on two cases: failure(including panics) and a succeess.
  30. var Try = hero.Try