Documentation ¶
Index ¶
- func AuthenticationMiddleware(auth service.Authenticator) gin.HandlerFunc
- func ErrorMiddleware() gin.HandlerFunc
- func GetStore(c *gin.Context) store.Store
- func GetUser(c *gin.Context) *model.User
- func HasAuthorization(auth service.Authorizator, action string) gin.HandlerFunc
- func Route(store store.Store, authentication service.Authenticator, ...) http.Handler
- func Start() error
- func StoreMiddleware(store store.Store) gin.HandlerFunc
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 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.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.