configuration.go 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. package context
  2. import "github.com/kataras/iris/core/netutil"
  3. // ConfigurationReadOnly can be implemented
  4. // by Configuration, it's being used inside the Context.
  5. // All methods that it contains should be "safe" to be called by the context
  6. // at "serve time". A configuration field may be missing when it's not
  7. // safe or its useless to be called from a request handler.
  8. type ConfigurationReadOnly interface {
  9. // GetVHost returns the non-exported vhost config field.
  10. GetVHost() string
  11. // GetLogLevel returns the LogLevel field.
  12. GetLogLevel() string
  13. // GetSocketSharding returns the SocketSharding field.
  14. GetSocketSharding() bool
  15. // GetDisablePathCorrection returns the DisablePathCorrection field
  16. GetDisablePathCorrection() bool
  17. // GetDisablePathCorrectionRedirection returns the DisablePathCorrectionRedirection field.
  18. GetDisablePathCorrectionRedirection() bool
  19. // GetEnablePathIntelligence returns the EnablePathIntelligence field.
  20. GetEnablePathIntelligence() bool
  21. // GetEnablePathEscape returns the EnablePathEscape field.
  22. GetEnablePathEscape() bool
  23. // GetForceLowercaseRouting returns the ForceLowercaseRouting field.
  24. GetForceLowercaseRouting() bool
  25. // GetFireMethodNotAllowed returns the FireMethodNotAllowed field.
  26. GetFireMethodNotAllowed() bool
  27. // GetDisableAutoFireStatusCode returns the DisableAutoFireStatusCode field.
  28. GetDisableAutoFireStatusCode() bool
  29. // ResetOnFireErrorCode retruns the ResetOnFireErrorCode field.
  30. GetResetOnFireErrorCode() bool
  31. // GetEnableOptimizations returns the EnableOptimizations field.
  32. GetEnableOptimizations() bool
  33. // GetDisableBodyConsumptionOnUnmarshal returns the DisableBodyConsumptionOnUnmarshal field.
  34. GetDisableBodyConsumptionOnUnmarshal() bool
  35. // GetFireEmptyFormError returns the FireEmptyFormError field.
  36. GetFireEmptyFormError() bool
  37. // GetTimeFormat returns the TimeFormat field.
  38. GetTimeFormat() string
  39. // GetCharset returns the Charset field.
  40. GetCharset() string
  41. // GetPostMaxMemory returns the PostMaxMemory field.
  42. GetPostMaxMemory() int64
  43. // GetTranslateLanguageContextKey returns the LocaleContextKey field.
  44. GetLocaleContextKey() string
  45. // GetLanguageContextKey returns the LanguageContextKey field.
  46. GetLanguageContextKey() string
  47. // GetVersionContextKey returns the VersionContextKey field.
  48. GetVersionContextKey() string
  49. // GetViewEngineContextKey returns the ViewEngineContextKey field.
  50. GetViewEngineContextKey() string
  51. // GetViewLayoutContextKey returns the ViewLayoutContextKey field.
  52. GetViewLayoutContextKey() string
  53. // GetViewDataContextKey returns the ViewDataContextKey field.
  54. GetViewDataContextKey() string
  55. // GetRemoteAddrHeaders returns RemoteAddrHeaders field.
  56. GetRemoteAddrHeaders() []string
  57. // GetRemoteAddrHeadersForce returns RemoteAddrHeadersForce field.
  58. GetRemoteAddrHeadersForce() bool
  59. // GetRemoteAddrPrivateSubnets returns the RemoteAddrPrivateSubnets field.
  60. GetRemoteAddrPrivateSubnets() []netutil.IPRange
  61. // GetSSLProxyHeaders returns the SSLProxyHeaders field.
  62. GetSSLProxyHeaders() map[string]string
  63. // GetHostProxyHeaders returns the HostProxyHeaders field.
  64. GetHostProxyHeaders() map[string]bool
  65. // GetOther returns the Other field.
  66. GetOther() map[string]interface{}
  67. }