middlewares

package
v0.0.0-...-2c0f4b9 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SessionMiddleware

func SessionMiddleware() gin.HandlerFunc

SessionMiddleware adds user id to the context if session exists, otherwise returns 401

func TestSessionMiddleware

func TestSessionMiddleware(userID string) gin.HandlerFunc

TestSessionMiddleware must be used in tests

func TestTransactionlMiddleware

func TestTransactionlMiddleware() gin.HandlerFunc

TestTransactionlMiddleware - must be used in tests

func TransactionlMiddleware

func TransactionlMiddleware(db *sqlx.DB) gin.HandlerFunc

TransactionlMiddleware - use for requests that need db transaction

Types

This section is empty.

Jump to

Keyboard shortcuts

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