metadata

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KeyToken      = "token"
	KeyPlatform   = "platform"
	KeyNetwork    = "network"
	KeyPackage    = "package"
	KeyVersion    = "version"
	KeyOSVersion  = "os_version"
	KeyBrand      = "brand"
	KeyModel      = "model"
	KeyDeviceID   = "device_id"
	KeyTimestamp  = "timestamp"
	KeyIsEmulator = "is_emulator"
	KeyIsDebug    = "is_debug"
	KeyLatitude   = "latitude"
	KeyLongitude  = "longitude"
	KeyLocale     = "locale"
	KeyChannel    = "channel"
	KeyProduct    = "product"
	KeyTraceID    = "trace_id"
	KeyRiskID     = "risk_id"
	KeyUUID       = "uuid"
	KeyUDID       = "udid"
	KeyUserAgent  = "user_agent"
	KeyDeviceMac  = "device_mac"
	KeyAndroidID  = "android_id"
	KeyOriginalIP = "x-forwarded-for"
)

Variables

View Source
var (
	Debug     = os.Getenv("DEBUG")
	SSHTunnel = os.Getenv("SSH_TUNNEL")
)

Functions

func AppendOutgoingMetadata added in v1.1.3

func AppendOutgoingMetadata(ctx context.Context, md *common.Metadata) context.Context

func ContextWithProduct

func ContextWithProduct(ctx context.Context, product string) context.Context

func IncomingMetadata added in v1.0.3

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