Documentation ¶
Index ¶
- type MyModule
- func (m *MyModule) Cleanup() error
- func (m *MyModule) Middleware(ctx core.RequestContext, next http.Handler)
- func (m *MyModule) Module() core.ModuleInfo
- func (m *MyModule) OnOriginRequest(request *http.Request, ctx core.RequestContext) (*http.Request, *http.Response)
- func (m *MyModule) OnOriginResponse(response *http.Response, ctx core.RequestContext) *http.Response
- func (m *MyModule) Provision(ctx *core.ModuleContext) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MyModule ¶
MyModule is a simple module that has access to the GraphQL operation and add a header to the response It demonstrates how to use the different handlers to customize the router. It also shows how to use the config file to configure and validate your module config. By default, the config file is located at `config.yaml` in the working directory of the router.
func (*MyModule) Middleware ¶
func (m *MyModule) Middleware(ctx core.RequestContext, next http.Handler)
func (*MyModule) Module ¶
func (m *MyModule) Module() core.ModuleInfo
func (*MyModule) OnOriginRequest ¶
func (*MyModule) OnOriginResponse ¶
Click to show internal directories.
Click to hide internal directories.