Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateContext ¶
func CreateContext(args *CustomContext, next http.Handler) http.Handler
CreateContext middleware attaches the CustomContext to each request
Types ¶
type CustomContext ¶
CustomContext struct holds the database connection
func GetContext ¶
func GetContext(ctx context.Context) *CustomContext
GetContext retrieves the CustomContext from the request context
Click to show internal directories.
Click to hide internal directories.