controller

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RespondInvalidBody

func RespondInvalidBody(err error, ctx *fiber.Ctx)

RespondInvalidBody returns ErrMap from validation.

func RouteJSON

func RouteJSON(ctrl interface{}) func(ctx *fiber.Ctx) error

RouteJSON handles json request.

func ValidateAndExecute

func ValidateAndExecute(ctrl Controller, ctx *fiber.Ctx) error

ValidateAndExecute handles controllers set by router.

Types

type Controller

type Controller interface {
	Exec(ctx *fiber.Ctx) (interface{}, error)
}

Controller is interface to handle routines in router.

Jump to

Keyboard shortcuts

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