mvc

package
v0.14.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GinBindingRequestDecoder

func GinBindingRequestDecoder(s *Metadata) web.DecodeRequestFunc

GinBindingRequestDecoder is a web.DecodeRequestFunc utilizing gin.Context's binding capabilities. The decoder instantiate the object based on Metadata.request

Types

type HandlerFunc

type HandlerFunc interface{}

HandlerFunc is a function with supported signature to handle MVC request and returns MVC response or error See rest.MappingBuilder and template.MappingBuilder for supported function signatures

type HandlerFuncValidator

type HandlerFuncValidator func(f *reflect.Value) error

HandlerFuncValidator validate HandlerFunc signature

type Metadata

type Metadata struct {
	// contains filtered or unexported fields
}

func NewFuncMetadata

func NewFuncMetadata(endpointFunc HandlerFunc, validator HandlerFuncValidator) *Metadata

NewFuncMetadata uses reflect to analyze the given handler function and create a Metadata. this function panic if given function have incorrect signature Caller can provide an optional validator to further validate function signature on top of default validation

func (Metadata) HandlerFunc

func (m Metadata) HandlerFunc() web.MvcHandlerFunc

Jump to

Keyboard shortcuts

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