configuration.go 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. package context
  2. import (
  3. "time"
  4. "github.com/kataras/iris/v12/core/netutil"
  5. )
  6. // ConfigurationReadOnly can be implemented
  7. // by Configuration, it's being used inside the Context.
  8. // All methods that it contains should be "safe" to be called by the context
  9. // at "serve time". A configuration field may be missing when it's not
  10. // safe or its useless to be called from a request handler.
  11. type ConfigurationReadOnly interface {
  12. // GetVHost returns the non-exported vhost config field.
  13. GetVHost() string
  14. // GetLogLevel returns the LogLevel field.
  15. GetLogLevel() string
  16. // GetSocketSharding returns the SocketSharding field.
  17. GetSocketSharding() bool
  18. // GetKeepAlive returns the KeepAlive field.
  19. GetKeepAlive() time.Duration
  20. // GetTimeout returns the Timeout field.
  21. GetTimeout() time.Duration
  22. // GetTimeoutMessage returns the TimeoutMessage field.
  23. GetTimeoutMessage() string
  24. // GetNonBlocking returns the NonBlocking field.
  25. GetNonBlocking() bool
  26. // GetDisablePathCorrection returns the DisablePathCorrection field
  27. GetDisablePathCorrection() bool
  28. // GetDisablePathCorrectionRedirection returns the DisablePathCorrectionRedirection field.
  29. GetDisablePathCorrectionRedirection() bool
  30. // GetEnablePathIntelligence returns the EnablePathIntelligence field.
  31. GetEnablePathIntelligence() bool
  32. // GetEnablePathEscape returns the EnablePathEscape field.
  33. GetEnablePathEscape() bool
  34. // GetForceLowercaseRouting returns the ForceLowercaseRouting field.
  35. GetForceLowercaseRouting() bool
  36. // GetEnableOptimizations returns the EnableDynamicHandler field.
  37. GetEnableDynamicHandler() bool
  38. // GetFireMethodNotAllowed returns the FireMethodNotAllowed field.
  39. GetFireMethodNotAllowed() bool
  40. // GetDisableAutoFireStatusCode returns the DisableAutoFireStatusCode field.
  41. GetDisableAutoFireStatusCode() bool
  42. // GetResetOnFireErrorCode returns the ResetOnFireErrorCode field.
  43. GetResetOnFireErrorCode() bool
  44. // GetURLParamSeparator returns URLParamSeparator field.
  45. GetURLParamSeparator() *string
  46. // GetEnableOptimizations returns the EnableOptimizations field.
  47. GetEnableOptimizations() bool
  48. // GetEnableProtoJSON returns the EnableProtoJSON field.
  49. GetEnableProtoJSON() bool
  50. // GetEnableEasyJSON returns the EnableEasyJSON field.
  51. GetEnableEasyJSON() bool
  52. // GetDisableBodyConsumptionOnUnmarshal returns the DisableBodyConsumptionOnUnmarshal field.
  53. GetDisableBodyConsumptionOnUnmarshal() bool
  54. // GetFireEmptyFormError returns the FireEmptyFormError field.
  55. GetFireEmptyFormError() bool
  56. // GetTimeFormat returns the TimeFormat field.
  57. GetTimeFormat() string
  58. // GetCharset returns the Charset field.
  59. GetCharset() string
  60. // GetPostMaxMemory returns the PostMaxMemory field.
  61. GetPostMaxMemory() int64
  62. // GetLocaleContextKey returns the LocaleContextKey field.
  63. GetLocaleContextKey() string
  64. // GetLanguageContextKey returns the LanguageContextKey field.
  65. GetLanguageContextKey() string
  66. // GetLanguageInputContextKey returns the LanguageInputContextKey field.
  67. GetLanguageInputContextKey() string
  68. // GetVersionContextKey returns the VersionContextKey field.
  69. GetVersionContextKey() string
  70. // GetVersionAliasesContextKey returns the VersionAliasesContextKey field.
  71. GetVersionAliasesContextKey() string
  72. // GetViewEngineContextKey returns the ViewEngineContextKey field.
  73. GetViewEngineContextKey() string
  74. // GetViewLayoutContextKey returns the ViewLayoutContextKey field.
  75. GetViewLayoutContextKey() string
  76. // GetViewDataContextKey returns the ViewDataContextKey field.
  77. GetViewDataContextKey() string
  78. // GetFallbackViewContextKey returns the FallbackViewContextKey field.
  79. GetFallbackViewContextKey() string
  80. // GetRemoteAddrHeaders returns RemoteAddrHeaders field.
  81. GetRemoteAddrHeaders() []string
  82. // GetRemoteAddrHeadersForce returns RemoteAddrHeadersForce field.
  83. GetRemoteAddrHeadersForce() bool
  84. // GetRemoteAddrPrivateSubnets returns the RemoteAddrPrivateSubnets field.
  85. GetRemoteAddrPrivateSubnets() []netutil.IPRange
  86. // GetSSLProxyHeaders returns the SSLProxyHeaders field.
  87. GetSSLProxyHeaders() map[string]string
  88. // GetHostProxyHeaders returns the HostProxyHeaders field.
  89. GetHostProxyHeaders() map[string]bool
  90. // GetOther returns the Other field.
  91. GetOther() map[string]interface{}
  92. }