configuration.go 4.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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. // GetDisablePathCorrection returns the DisablePathCorrection field
  25. GetDisablePathCorrection() bool
  26. // GetDisablePathCorrectionRedirection returns the DisablePathCorrectionRedirection field.
  27. GetDisablePathCorrectionRedirection() bool
  28. // GetEnablePathIntelligence returns the EnablePathIntelligence field.
  29. GetEnablePathIntelligence() bool
  30. // GetEnablePathEscape returns the EnablePathEscape field.
  31. GetEnablePathEscape() bool
  32. // GetForceLowercaseRouting returns the ForceLowercaseRouting field.
  33. GetForceLowercaseRouting() bool
  34. // GetEnableOptimizations returns the EnableDynamicHandler field.
  35. GetEnableDynamicHandler() bool
  36. // GetFireMethodNotAllowed returns the FireMethodNotAllowed field.
  37. GetFireMethodNotAllowed() bool
  38. // GetDisableAutoFireStatusCode returns the DisableAutoFireStatusCode field.
  39. GetDisableAutoFireStatusCode() bool
  40. // GetResetOnFireErrorCode returns the ResetOnFireErrorCode field.
  41. GetResetOnFireErrorCode() bool
  42. // GetURLParamSeparator returns URLParamSeparator field.
  43. GetURLParamSeparator() *string
  44. // GetEnableOptimizations returns the EnableOptimizations field.
  45. GetEnableOptimizations() bool
  46. // GetEnableProtoJSON returns the EnableProtoJSON field.
  47. GetEnableProtoJSON() bool
  48. // GetEnableEasyJSON returns the EnableEasyJSON field.
  49. GetEnableEasyJSON() bool
  50. // GetDisableBodyConsumptionOnUnmarshal returns the DisableBodyConsumptionOnUnmarshal field.
  51. GetDisableBodyConsumptionOnUnmarshal() bool
  52. // GetFireEmptyFormError returns the FireEmptyFormError field.
  53. GetFireEmptyFormError() bool
  54. // GetTimeFormat returns the TimeFormat field.
  55. GetTimeFormat() string
  56. // GetCharset returns the Charset field.
  57. GetCharset() string
  58. // GetPostMaxMemory returns the PostMaxMemory field.
  59. GetPostMaxMemory() int64
  60. // GetLocaleContextKey returns the LocaleContextKey field.
  61. GetLocaleContextKey() string
  62. // GetLanguageContextKey returns the LanguageContextKey field.
  63. GetLanguageContextKey() string
  64. // GetLanguageInputContextKey returns the LanguageInputContextKey field.
  65. GetLanguageInputContextKey() string
  66. // GetVersionContextKey returns the VersionContextKey field.
  67. GetVersionContextKey() string
  68. // GetVersionAliasesContextKey returns the VersionAliasesContextKey field.
  69. GetVersionAliasesContextKey() string
  70. // GetViewEngineContextKey returns the ViewEngineContextKey field.
  71. GetViewEngineContextKey() string
  72. // GetViewLayoutContextKey returns the ViewLayoutContextKey field.
  73. GetViewLayoutContextKey() string
  74. // GetViewDataContextKey returns the ViewDataContextKey field.
  75. GetViewDataContextKey() string
  76. // GetFallbackViewContextKey returns the FallbackViewContextKey field.
  77. GetFallbackViewContextKey() string
  78. // GetRemoteAddrHeaders returns RemoteAddrHeaders field.
  79. GetRemoteAddrHeaders() []string
  80. // GetRemoteAddrHeadersForce returns RemoteAddrHeadersForce field.
  81. GetRemoteAddrHeadersForce() bool
  82. // GetRemoteAddrPrivateSubnets returns the RemoteAddrPrivateSubnets field.
  83. GetRemoteAddrPrivateSubnets() []netutil.IPRange
  84. // GetSSLProxyHeaders returns the SSLProxyHeaders field.
  85. GetSSLProxyHeaders() map[string]string
  86. // GetHostProxyHeaders returns the HostProxyHeaders field.
  87. GetHostProxyHeaders() map[string]bool
  88. // GetOther returns the Other field.
  89. GetOther() map[string]interface{}
  90. }