context

package
v0.0.0-...-1a88b7f Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CtxWithDB

func CtxWithDB(ctx context.Context, db *gorm.DB) context.Context

CtxWithDB create a context that contain the specified *gorm.DB value.

func CtxWithLog

func CtxWithLog(ctx context.Context, log *slog.Logger) context.Context

CtxWithLog create a context that contain the specified *slog.Logger value.

func DBFromCtx

func DBFromCtx(ctx context.Context) *gorm.DB

DBFromCtx get a db from a specified context.

func LogFromCtx

func LogFromCtx(ctx context.Context) *slog.Logger

LogFromCtx get a log from a specified context.

Types

This section is empty.

Jump to

Keyboard shortcuts

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