grpcutil

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2020 License: Apache-2.0 Imports: 2 Imported by: 2

Documentation

Overview

Package grpcutil contains functions for interacting with gRPC.

Index

Constants

View Source
const JWTMetadataKey = "jwt"

JWTMetadataKey is the key in the metadata.

View Source
const SessionIDMetadataKey = "sessionid"

SessionIDMetadataKey is the key in the metadata.

Variables

This section is empty.

Functions

func JWTFromGRPCRequest

func JWTFromGRPCRequest(ctx context.Context) (rawjwt string, ok bool)

JWTFromGRPCRequest returns the JWT from the gRPC request.

func SessionIDFromGRPCRequest

func SessionIDFromGRPCRequest(ctx context.Context) (sessionID string, ok bool)

SessionIDFromGRPCRequest returns the session id from the gRPC request.

func WithOutgoingJWT

func WithOutgoingJWT(ctx context.Context, rawjwt string) context.Context

WithOutgoingJWT appends a metadata header for the JWT to a context.

func WithOutgoingSessionID

func WithOutgoingSessionID(ctx context.Context, sessionID string) context.Context

WithOutgoingSessionID appends a metadata header for the session ID to a context.

Types

This section is empty.

Jump to

Keyboard shortcuts

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