wrapper

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2025 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUnknownRequestDataType = func(data any) error {
	return fmt.Errorf("unknown request data type. type: %#v", data)
}

Functions

This section is empty.

Types

type Request

type Request interface {
	Context() context.Context
	Params() map[string]string
	Headers() map[string][]string
	Body() io.ReadCloser
	Method() string
	URL() *url.URL
	Query() url.Values
	Path() string
}

type RequestWrapper

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

func Modifier

func Modifier(request Request) *RequestWrapper

func (*RequestWrapper) Body

func (r *RequestWrapper) Body() io.ReadCloser

func (*RequestWrapper) Context

func (r *RequestWrapper) Context() context.Context

func (*RequestWrapper) Form

func (r *RequestWrapper) Form() url.Values

func (*RequestWrapper) Headers

func (r *RequestWrapper) Headers() url.Values

func (*RequestWrapper) Method

func (r *RequestWrapper) Method() string

func (*RequestWrapper) Path

func (r *RequestWrapper) Path() string

func (*RequestWrapper) Query

func (r *RequestWrapper) Query() url.Values

func (*RequestWrapper) SetBody

func (r *RequestWrapper) SetBody(data []byte)

func (*RequestWrapper) SetHeader

func (r *RequestWrapper) SetHeader(key, value string)

func (*RequestWrapper) SetQueryParam

func (r *RequestWrapper) SetQueryParam(key, value string)

func (*RequestWrapper) URL

func (r *RequestWrapper) URL() *url.URL

Jump to

Keyboard shortcuts

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