binding

package
v0.0.0-...-6c06fb7 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2021 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handler

func Handler(fn interface{}) http.HandlerFunc

github.com/go-macaron/macaron/return_handler.go

func Inject

func Inject(fn func(inject.Injector)) func(next http.Handler) http.Handler

func Injector

func Injector(next http.Handler) http.Handler

func Map

func Map(val interface{}) func(next http.Handler) http.Handler

Maps the interface{} value based on its immediate type from reflect.TypeOf.

func MapTo

func MapTo(val interface{}, ifacePtr interface{}) func(next http.Handler) http.Handler

Maps the interface{} value based on the pointer of an Interface provided. This is really only useful for mapping a value as an interface, as interfaces cannot at this time be referenced directly without a pointer.

func Set

func Set(typ reflect.Type, val reflect.Value) func(next http.Handler) http.Handler

Provides a possibility to directly insert a mapping based on type and value. This makes it possible to directly map type arguments not possible to instantiate with reflect like unidirectional channels.

Types

This section is empty.

Jump to

Keyboard shortcuts

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