metadata

package
v2.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KeyProduct     = "prd"
	KeyPackage     = "pkg"
	KeyVersion     = "ver"
	KeyOSVersion   = "os"
	KeyBrand       = "brand"
	KeyModel       = "model"
	KeyDeviceID    = "udid"
	KeyFingerprint = "fp"
	KeyLocale      = "loc"
	KeyLatitude    = "lat"
	KeyLongitude   = "lon"
	KeyPlatform    = "plf"
	KeyNetwork     = "net"
	KeyTimestamp   = "time"
	KeyTraceID     = "sn"
	KeyIsEmulator  = "emulator"
	KeyIsDevelop   = "dev"
	KeyIsTesting   = "test"
	KeyChannel     = "channel"
	KeyUUID        = "uuid"
	KeyIMEI        = "imei"
	KeyDeviceMac   = "mac"
	KeyUserAgent   = "ua"
	KeyToken       = "token"

	KeyIANAUserAgent = "user-agent"
	KeyOriginalIP    = "x-forwarded-for"
)

Variables

View Source
var (
	EnvDevelop = os.Getenv("DEVELOPMENT")
	EnvTesting = os.Getenv("TESTING")
)

Functions

func IncomingMetadata

func IncomingMetadata(ctx context.Context) *common.Metadata

func ParseIncomingMetadata

func ParseIncomingMetadata(ctx context.Context) *common.Metadata

func StreamServerInterceptor

func StreamServerInterceptor() grpc.StreamServerInterceptor

StreamServerInterceptor returns a new streaming server interceptor for parsing request metadata.

func UnaryServerInterceptor

func UnaryServerInterceptor() grpc.UnaryServerInterceptor

UnaryServerInterceptor returns a new unary server interceptor for parsing request metadata.

Types

This section is empty.

Jump to

Keyboard shortcuts

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