middleware

package
v0.6.4 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2014 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllowCORS

func AllowCORS() martini.Handler

func Auth

func Auth(user_storage storage.UserStorage) martini.Handler

func CombinedLogger

func CombinedLogger() martini.Handler

func EncodeOutput

func EncodeOutput(prettify bool) martini.Handler

func JsonLogger

func JsonLogger() martini.Handler

func RequireRoles

func RequireRoles(roles ...dsapid.UserRoleName) martini.Handler

Types

type OutputEncoder

type OutputEncoder interface {
	Encode(v ...interface{}) ([]byte, error)
	MustEncode(v ...interface{}) []byte
}

type User

type User interface {
	GetId() string
	GetName() string
	HasRoles(...dsapid.UserRoleName) bool
	IsGuest() bool
	GetAuthInfo() interface{}
}

Jump to

Keyboard shortcuts

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