types

package
v1.4.4 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RouteContextKey contextKey = iota
)

Variables

This section is empty.

Functions

func AddURLParamsToContext

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

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

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

func URLParamFromCtx

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

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

Types

type Context

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