Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNilRequest = errors.New("nil request")
)
Functions ¶
func SetOutgoingCtxMetadataAuthorizationToken ¶ added in v0.6.0
func SetOutgoingCtxMetadataAuthorizationToken( ctx context.Context, r *http.Request, ) (context.Context, error)
SetOutgoingCtxMetadataAuthorizationToken is a helper function to set the authorization metadata to the outgoing context
Retrieves the authorization from the request context and sets it in the provided context.
Parameters:
- ctx: the outgoing context for the gRPC call
- r: the request to get the authorization from
Returns:
- context.Context: the context with the authorization metadata
- error: an error if the request is nil
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.