middleware

package
v0.0.0-...-598afe9 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package middleware includes all gin-style middleware. Both API and middleware are in handlers chain.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrHandler

func ErrHandler() gin.HandlerFunc

ErrHandler checks whether there is an error after API is called. If not, it will do nothing and just return

func IdValidator

func IdValidator() gin.HandlerFunc

IdValidator validates whether id is valid. With regard to GET, PUT and DELETE, we expect that id is integer(int64).

func SimpleAuthorizer

func SimpleAuthorizer() gin.HandlerFunc

SimpleAuthorizer provides a simple authorization for users.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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