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 FetchNamespaceFromContext ¶
FetchNamespaceFromContext if not found, fallback to default
func NamespaceUnaryInterceptor ¶
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 ¶
type NamespaceKey struct{}
NamespaceKey is injected in context with the tenant context
type NamespaceService ¶
Click to show internal directories.
Click to hide internal directories.