mirror of
https://github.com/warmbly/warmbly.git
synced 2026-11-28 08:05:45 +00:00
17 lines
314 B
Go
17 lines
314 B
Go
package repository
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/jackc/pgx/v5"
|
|
)
|
|
|
|
type SessionConnector func(context.Context) (*pgx.Conn, error)
|
|
|
|
func requireSessionConnector(connector SessionConnector) SessionConnector {
|
|
if connector == nil {
|
|
panic("direct database session connector is required")
|
|
}
|
|
return connector
|
|
}
|