setvars

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init added in v0.9.0

func Init() error

Init registers the setvars middleware.

Types

type Middlware added in v0.10.0

type Middlware struct {
	// contains filtered or unexported fields
}

Middlware is a middleware that sets variables in the request context.

func NewMiddleware

func NewMiddleware(options []*Options) *Middlware

NewMiddleware creates a new SetVarsMiddlware instance.

func (*Middlware) ServeHTTP added in v0.10.0

func (m *Middlware) ServeHTTP(_ context.Context, c *app.RequestContext)

type Options added in v0.3.0

type Options struct {
	Key     string
	Value   string
	Default string
	// contains filtered or unexported fields
}

Options defines the key-value pairs to be set in the request context.

Jump to

Keyboard shortcuts

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