Documentation ¶
Overview ¶
Package db_context dbContext provides a wrapper around db context handling to allow access to the db context without requiring importing the db package, thus avoiding cyclic imports
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Transaction ¶
func Transaction(ctx context.Context) (tx *transaction.Transaction, ok bool)
Transaction extracts the transaction value from the context
func TxID ¶
Return the transaction ID from the context, if it exists. If there is no transaction, ok is false.
func WithTransaction ¶
func WithTransaction(ctx context.Context, tx *transaction.Transaction) context.Context
WithTransaction adds the transaction to the context and returns a new context
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.