tenant

package
v1.3.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 19, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

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.

func AddActiveProjectIdToContext

func AddActiveProjectIdToContext(ctx context.Context, activeProjectId string) context.Context

func GetActiveProjectIdFromContext

func GetActiveProjectIdFromContext(ctx context.Context) string

Types

type ContextKey

type ContextKey string // SA1029

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL