package
0.0.0-20240719153732-6e8a03e781de
Repository: https://github.com/grafana/dskit.git
Documentation: pkg.go.dev

# Functions

ExtractFromGRPCRequest extracts the user ID from the request metadata and returns the user ID and a context with the user ID injected.
ExtractOrgID gets the org ID from the context.
ExtractOrgIDFromHTTPRequest extracts the org ID from the request headers and returns the org ID and a context with the org ID embedded.
ExtractUserID gets the user ID from the context.
ExtractUserIDFromHTTPRequest extracts the org ID from the request headers and returns the org ID and a context with the org ID embedded.
InjectIntoGRPCRequest injects the orgID from the context into the request metadata.
InjectOrgID returns a derived context containing the org ID.
InjectOrgIDIntoHTTPRequest injects the orgID from the context into the request headers.
InjectUserID returns a derived context containing the user ID.
InjectUserIDIntoHTTPRequest injects the userID from the context into the request headers.
LogWith returns user and org information from the context as log fields.

# Constants

OrgIDHeaderName denotes the OrgID the request has been authenticated as.
UserIDHeaderName denotes the UserID the request has been authenticated as.

# Variables

Errors that we return.
Errors that we return.
Errors that we return.
Errors that we return.
Errors that we return.