appcontext

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: May 26, 2026 License: MIT Imports: 3 Imported by: 1 module, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAcceptLanguage

func GetAcceptLanguage(ctx context.Context) string

GetAcceptLanguage retrieves the accept language from the context. Returns English as the default if not set.

func GetRequestId

func GetRequestId(ctx context.Context) string

GetRequestId retrieves the request ID from the context. Returns an empty string if not set.

func GetRequestStartTime

func GetRequestStartTime(ctx context.Context) time.Time

GetRequestStartTime retrieves the request start time from the context. Returns a zero time if not set.

func GetServiceVersion

func GetServiceVersion(ctx context.Context) string

GetServiceVersion retrieves the service version from the context. Returns an empty string if not set.

func GetUserAgent

func GetUserAgent(ctx context.Context) string

GetUserAgent retrieves the user agent string from the context. Returns an empty string if not set.

func SetAcceptLanguage

func SetAcceptLanguage(ctx context.Context, lang string) context.Context

SetAcceptLanguage stores the accept language value in the context.

func SetRequestId

func SetRequestId(ctx context.Context, rid string) context.Context

SetRequestId stores the request ID in the context.

func SetRequestStartTime

func SetRequestStartTime(ctx context.Context, t time.Time) context.Context

SetRequestStartTime stores the request start time in the context.

func SetServiceVersion

func SetServiceVersion(ctx context.Context, version string) context.Context

SetServiceVersion stores the service version in the context.

func SetUserAgent

func SetUserAgent(ctx context.Context, ua string) context.Context

SetUserAgent stores the user agent string in the context.

Types

This section is empty.

Jump to

Keyboard shortcuts

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