integration

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: May 20, 2024 License: MIT Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UseEchoPathRouter added in v0.17.0

func UseEchoPathRouter(e *echo.Echo)

func UseEchoRouter added in v0.17.0

func UseEchoRouter(name string, e *echo.Echo)

UseEchoRouter registers a new directive executor which can extract values from path variables. https://ggicci.github.io/httpin/integrations/echo

Usage:

import httpin_integration "github.com/ggicci/httpin/integration"

func init() {
    e := echo.New()
    httpin_integration.UseEchoRouter("path", e)

// or

    httpin_integration.UseEchoPathRouter(e)
}

func UseGochiURLParam

func UseGochiURLParam(name string, fn GochiURLParamFunc)

UseGochiURLParam registers a directive executor which can extract values from `chi.URLParam`, i.e. path variables. https://ggicci.github.io/httpin/integrations/gochi

Usage:

import httpin_integration "github.com/ggicci/httpin/integration"

func init() {
    httpin_integration.UseGochiURLParam("path", chi.URLParam)
}

func UseGorillaMux

func UseGorillaMux(name string, fnVars GorillaMuxVarsFunc)

UseGorillaMux registers a new directive executor which can extract values from `mux.Vars`, i.e. path variables. https://ggicci.github.io/httpin/integrations/gorilla

Usage:

import httpin_integration "github.com/ggicci/httpin/integration"

func init() {
    httpin_integration.UseGorillaMux("path", mux.Vars)
}

Types

type GochiURLParamFunc

type GochiURLParamFunc func(r *http.Request, key string) string

GochiURLParamFunc is chi.URLParam

type GorillaMuxVarsFunc

type GorillaMuxVarsFunc func(*http.Request) map[string]string

GorillaMuxVarsFunc is mux.Vars

Jump to

Keyboard shortcuts

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