example

package
v0.4.6 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2020 License: MIT Imports: 4 Imported by: 15

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMiddleware

func NewMiddleware(
	deps *module.Dependencies,
	options Options,
) zanzibar.MiddlewareHandle

NewMiddleware creates a new middleware that executes the next middleware after performing it's operations.

Types

type MiddlewareState

type MiddlewareState struct {
	Baz string
}

MiddlewareState accessible by other middlewares and endpoint handler though the context object.

type Options

type Options struct {
	Foo string   `json:"Foo"`
	Bar int      `json:",omitempty"`
	Baz []string `json:"Baz"`
}

Options for middleware configuration

Jump to

Keyboard shortcuts

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