module

package
v0.0.0-...-db2b026 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MyModule

type MyModule struct {
	Value uint64 `mapstructure:"value"`

	Logger *zap.Logger
}

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) Cleanup

func (m *MyModule) Cleanup() error

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 (m *MyModule) OnOriginRequest(request *http.Request, ctx core.RequestContext) (*http.Request, *http.Response)

func (*MyModule) OnOriginResponse

func (m *MyModule) OnOriginResponse(response *http.Response, ctx core.RequestContext) *http.Response

func (*MyModule) Provision

func (m *MyModule) Provision(ctx *core.ModuleContext) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL