ctx

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2023 License: AGPL-3.0, AGPL-3.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

View Source
const DUMMY_VAL_FROM_CTX = 999999999

Variables

This section is empty.

Functions

func FromContextHTTPRequestID

func FromContextHTTPRequestID(ctx context.Context) uint64

FromContextHTTPRequestID extracts the RequestID from ctx, if present.

func FromContextSQLId

func FromContextSQLId(ctx context.Context) uint64

FromContextSQLId extracts the SQL id from ctx, if present

func FromContextTx

func FromContextTx(ctx context.Context) *sqlx.Tx

FromContextTx extracts the Tx from ctx, if present.

func NewContextHTTPRequestID

func NewContextHTTPRequestID(ctx context.Context, requestID uint64) context.Context

NewContextHTTPRequestID returns a new Context carrying RequestID.

func NewContextSQLId

func NewContextSQLId(ctx context.Context, sqlID uint64) context.Context

NewContextSQLId returns a new Context carrying SQL id

func NewContextTx

func NewContextTx(ctx context.Context, tx *sqlx.Tx) context.Context

NewContextTx returns a new Context carrying Tx.

Types

This section is empty.

Jump to

Keyboard shortcuts

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