types

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2022 License: Apache-2.0 Imports: 2 Imported by: 4

Documentation

Index

Constants

View Source
const (
	RouteContextKey contextKey = iota
)

Variables

This section is empty.

Functions

func AddURLParamsToContext added in v1.4.0

func AddURLParamsToContext(parent context.Context, params map[string]string) context.Context

AddURLParamsToContext returns a copy of parent in which the context value is set

func URLParam added in v1.4.0

func URLParam(r *http.Request, key string) string

URLParam returns the url parameter from a http.Request object.

func URLParamFromCtx added in v1.4.0

func URLParamFromCtx(ctx context.Context, key string) string

URLParamFromCtx returns the url parameter from a http.Request Context.

Types

type Context added in v1.4.0

type Context struct {
	PathParams map[string]string
}

type ParameterType

type ParameterType string
const (
	Integer ParameterType = "integer"
	Number  ParameterType = "number"
	Boolean ParameterType = "boolean"
	String  ParameterType = "string"
	Array   ParameterType = "array"

	File ParameterType = "file"
)

func (ParameterType) String

func (pt ParameterType) String() string

Jump to

Keyboard shortcuts

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