server

package
v0.0.0-...-ab77271 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2018 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthenticationMiddleware

func AuthenticationMiddleware(auth service.Authenticator) gin.HandlerFunc

AuthenticationMiddleware authenticates an user and sets it's context value

func ErrorMiddleware

func ErrorMiddleware() gin.HandlerFunc

ErrorMiddleware handles error processing

func GetStore

func GetStore(c *gin.Context) store.Store

GetStore returns a store saved in a context

func GetUser

func GetUser(c *gin.Context) *model.User

GetUser returns the current context user

func HasAuthorization

func HasAuthorization(auth service.Authorizator, action string) gin.HandlerFunc

HasAuthorization verifies if a given user has enough authorization to perform an action

func Route

func Route(store store.Store,
	authentication service.Authenticator,
	authorization service.Authorizator) http.Handler

Route configures all necessary middlewares and routes needed

func Start

func Start() error

Start creates a new Bossanova server with the configuration retrieved from environment variable and runs it

func StoreMiddleware

func StoreMiddleware(store store.Store) gin.HandlerFunc

StoreMiddleware creates a new connection for each request providing a fast and parallelable store backend access

Types

This section is empty.

Jump to

Keyboard shortcuts

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