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.
Click to show internal directories.
Click to hide internal directories.