Documentation ¶
Index ¶
- func AddInterceptor(fn RequestInterceptor)
- func AddRoute(name string, method string, pattern string, handlerFunction http.HandlerFunc)
- func LoadConfigFromFile(file *os.File)
- func LoadConfigFromJSON(configJSON string)
- func LoadConfigFromPath(configPath string)
- func SetAddress(address string)
- func SetDebug(debug bool)
- func SetPort(port string)
- func StartServer()
- type RequestInterceptor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddInterceptor ¶
func AddInterceptor(fn RequestInterceptor)
func AddRoute ¶
func AddRoute(name string, method string, pattern string, handlerFunction http.HandlerFunc)
func LoadConfigFromFile ¶
func LoadConfigFromJSON ¶
func LoadConfigFromJSON(configJSON string)
func LoadConfigFromPath ¶
func LoadConfigFromPath(configPath string)
func SetAddress ¶
func SetAddress(address string)
Types ¶
type RequestInterceptor ¶
type RequestInterceptor func(http.ResponseWriter, *http.Request) bool
Intercepts all incoming requests and passes control over the user. If the request was handled, RequestInterceptor should return true. This means the request will not be routed to the original target
Click to show internal directories.
Click to hide internal directories.