middlewares

package
v3.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2015 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package middlewares provides common middleware handlers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustLogin

func MustLogin(next http.Handler) http.Handler

MustLogin is a middleware that checks existence of current user.

func MustLoginApi

func MustLoginApi(next http.Handler) http.Handler

MustLoginApi is a middleware that checks /api login.

func SetAddr

func SetAddr(addr string) func(http.Handler) http.Handler

func SetClusters

func SetClusters(next http.Handler) http.Handler

SetClusters sets clusters data in context based on logged in user ID.

func SetCookieStore

func SetCookieStore(cookieStore *sessions.CookieStore) func(http.Handler) http.Handler

func SetDB

func SetDB(db *sqlx.DB) func(http.Handler) http.Handler

func SetWSTraffickers

func SetWSTraffickers(wsTraffickers *wstrafficker.WSTraffickers) func(http.Handler) http.Handler

Types

This section is empty.

Jump to

Keyboard shortcuts

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