Documentation
¶
Index ¶
- func BuildContextWithNamespace(ctx context.Context, ns *namespace.Namespace) context.Context
- func FetchNamespaceFromContext(ctx context.Context) *namespace.Namespace
- func NamespaceUnaryInterceptor(service NamespaceService) grpc.UnaryServerInterceptor
- func StatsD(statsdReporter StatsDClient) grpc.UnaryServerInterceptor
- func UserHeaderCtx(IdentityHeaderKeyUUID, IdentityHeaderKeyEmail string) grpc.UnaryServerInterceptor
- type NamespaceKey
- type NamespaceService
- type StatsDClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildContextWithNamespace ¶ added in v0.5.0
func FetchNamespaceFromContext ¶ added in v0.5.0
FetchNamespaceFromContext if not found, fallback to default
func NamespaceUnaryInterceptor ¶ added in v0.5.0
func NamespaceUnaryInterceptor(service NamespaceService) grpc.UnaryServerInterceptor
NamespaceUnaryInterceptor namespace can be passed in jwt token or headers, if none provided it falls back to default
func StatsD ¶
func StatsD(statsdReporter StatsDClient) grpc.UnaryServerInterceptor
func UserHeaderCtx ¶
func UserHeaderCtx(IdentityHeaderKeyUUID, IdentityHeaderKeyEmail string) grpc.UnaryServerInterceptor
UserHeaderCtx middleware will propagate a valid user ID as string within request context use `user.FromContext` function to get the user ID string
Types ¶
type NamespaceKey ¶ added in v0.5.0
type NamespaceKey struct{}
NamespaceKey is injected in context with the tenant context
type NamespaceService ¶ added in v0.5.0
Click to show internal directories.
Click to hide internal directories.