meta

package
v1.241.1 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2024 License: MIT Imports: 4 Imported by: 4

Documentation

Index

Constants

View Source
const (
	// UserAgentKey for meta.
	UserAgentKey = "userAgent"

	// IPAddrKey for meta.
	IPAddrKey = "ipAddr"

	// Authorization for meta.
	AuthorizationKey = "authorization"

	// GeoLocation for meta.
	GeolocationKey = "geoLocation"
)
View Source
const (
	// RequestIDKey for meta.
	RequestIDKey = "requestId"

	// ServiceKey for meta.
	ServiceKey = "service"

	// PathKey for meta.
	PathKey = "path"

	// MethodKey for meta.
	MethodKey = "method"

	// CodeKey for meta.
	CodeKey = "code"

	// DurationKey for meta.
	DurationKey = "duration"
)

Variables

Module for fx.

Functions

func Authorization added in v1.205.0

func Authorization(ctx context.Context) meta.Valuer

Authorization for transport.

func Geolocation added in v1.219.0

func Geolocation(ctx context.Context) meta.Valuer

Geolocation for transport.

func IPAddr added in v1.168.0

func IPAddr(ctx context.Context) meta.Valuer

IPAddr for transport.

func RegisterKeys added in v1.204.0

func RegisterKeys()

RegisterKeys for limiter.

func RequestID

func RequestID(ctx context.Context) meta.Valuer

RequestID for transport.

func UserAgent

func UserAgent(ctx context.Context) meta.Valuer

UserAgent for transport.

func WithAuthorization added in v1.205.0

func WithAuthorization(ctx context.Context, auth meta.Valuer) context.Context

WithAuthorization for transport.

func WithGeolocation added in v1.219.0

func WithGeolocation(ctx context.Context, location meta.Valuer) context.Context

WithGeolocation for transport.

func WithIPAddr added in v1.168.0

func WithIPAddr(ctx context.Context, addr meta.Valuer) context.Context

WithIPAddr for transport.

func WithIPAddrKind added in v1.211.0

func WithIPAddrKind(ctx context.Context, kind meta.Valuer) context.Context

WithIPAddrKind for transport.

func WithRequestID

func WithRequestID(ctx context.Context, id meta.Valuer) context.Context

WithRequestID for transport.

func WithUserAgent

func WithUserAgent(ctx context.Context, userAgent meta.Valuer) context.Context

WithUserAgent for transport.

Types

This section is empty.

Jump to

Keyboard shortcuts

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