pathvar

package
v0.0.0-...-8ce278b Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetVars

func SetVars(r *fasthttp.RequestCtx, params Params) (free func())

SetVars writes params into given r.

Types

type EmptyParams

type EmptyParams struct{}

func (EmptyParams) Get

func (m EmptyParams) Get(key string) (string, bool)

func (EmptyParams) Len

func (m EmptyParams) Len() int

func (EmptyParams) VisitAll

func (m EmptyParams) VisitAll(_ func(key, value string))

type MapParams

type MapParams map[string]string

func (MapParams) Get

func (m MapParams) Get(key string) (string, bool)

func (MapParams) Len

func (m MapParams) Len() int

func (MapParams) VisitAll

func (m MapParams) VisitAll(f func(key, value string))

type Params

type Params interface {
	Get(string) (string, bool)
	VisitAll(f func(key, value string))
	Len() int
}

func Vars

func Vars(r *fasthttp.RequestCtx) Params

Vars parses path variables and returns a map.

Jump to

Keyboard shortcuts

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