Documentation ¶
Index ¶
Constants ¶
const RequestIDKey ctxKeyRequestID = 0
RequestIDKey is the key that holds th unique request ID in a request context.
Variables ¶
This section is empty.
Functions ¶
func AddCors ¶
AddCors : AddCors is the middleware which will add the cors in the response and response with status ok on preflight request.
func AddRequestID ¶
AddRequestID is a middleware that injects a request ID into the context of each request. A request ID is a string of the form "host.example.com/random-0001", where "random" is a base62 random string that uniquely identifies this go process, and where the last number is an atomically incremented request counter.
func ChangeContext ¶
ChangeContext : ChangeContext is responsible to add the authorization token to the context so that in grpc server we can easily get authentication token and verify the authentication token.
Types ¶
This section is empty.