Documentation
¶
Index ¶
- Constants
- func ActiveProjectIdEchoMiddleware() echo.MiddlewareFunc
- func ActiveProjectIdGrpcInterceptor() grpc.UnaryServerInterceptor
- func AddActiveProjectIdToContext(ctx context.Context, activeProjectId string) context.Context
- func GetActiveProjectIdFromContext(ctx context.Context) string
- type ContextKey
Constants ¶
View Source
const ( ActiveProjectIdHeaderKey = "Activeprojectid" ActiveProjectIdContextKey = ContextKey(ActiveProjectIdHeaderKey) DefaultProjectId = "00000000-0000-0000-0000-000000000000" )
Variables ¶
This section is empty.
Functions ¶
func ActiveProjectIdEchoMiddleware ¶
func ActiveProjectIdEchoMiddleware() echo.MiddlewareFunc
ActiveProjectIdEchoMiddleware returns an echo middleware function that extracts the active project id from the request header and adds it to the echo request context.
func ActiveProjectIdGrpcInterceptor ¶
func ActiveProjectIdGrpcInterceptor() grpc.UnaryServerInterceptor
ActiveProjectIdGrpcInterceptor returns an interceptor to extract the active project id from jwt and provide it in the context.
Types ¶
type ContextKey ¶
type ContextKey string // SA1029
Click to show internal directories.
Click to hide internal directories.