requesttransformer

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: 4 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 request_transformer middleware.

Types

type AddOptions

type AddOptions struct {
	Headers     map[string]string
	Querystring map[string]string
}

AddOptions defines the headers and query parameters to be added to the request if they are not already present.

type Options

type Options struct {
	Add    AddOptions
	Set    SetOptions
	Remove RemoveOptions
}

Options defines the total configuration for the request transformer middleware.

type RemoveOptions

type RemoveOptions struct {
	Headers     []string
	Querystring []string
}

RemoveOptions defines the headers and query parameters to be removed from the request.

type RequestTransFormaterMiddleware

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

RequestTransFormaterMiddleware is a middleware that transforms the request by adding, setting, or removing headers and query parameters.

func NewMiddleware

func NewMiddleware(opts Options) *RequestTransFormaterMiddleware

NewMiddleware creates a new RequestTransFormaterMiddleware instance.

func (*RequestTransFormaterMiddleware) ServeHTTP

type SetOptions added in v0.3.0

type SetOptions struct {
	Headers     map[string]string
	Querystring map[string]string
}

SetOptions defines the headers and query parameters to be set on the request, overwriting any existing values.

Jump to

Keyboard shortcuts

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