middleware

package
v0.0.0-...-447d7c9 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2017 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Logger

func Logger(logger *logrus.Logger, timeFormat string, utc bool, module string) gin.HandlerFunc

Logger logs HTTP requests into the logrus log

Types

type Impl

type Impl struct {
	*base.API
}

Impl is the implementation of the middleware module

func (*Impl) Recovery

func (i *Impl) Recovery(c *gin.Context)

Recovery handles panics in the API

func (*Impl) RequiresAuth

func (i *Impl) RequiresAuth(c *gin.Context)

RequiresAuth ensures that user is logged in

func (*Impl) UsesAuth

func (i *Impl) UsesAuth(c *gin.Context)

UsesAuth loads up token and account information given a request with a token specified

Jump to

Keyboard shortcuts

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