Documentation ¶
Index ¶
- func GetAppSourceFromContext(ctx context.Context) string
- func GetRolesFromContext(ctx context.Context) []string
- func GetTenantFromContext(ctx context.Context) string
- func GetUserEmailFromContext(ctx context.Context) string
- func GetUserIdFromContext(ctx context.Context) string
- func SetAppSourceInContext(ctx context.Context, appSource string) context.Context
- func SetTenantInContext(ctx context.Context, tenant string) context.Context
- func ValidateTenant(ctx context.Context) error
- func WithContext(customContext *CustomContext, next http.Handler) http.Handler
- func WithCustomContext(ctx context.Context, customContext *CustomContext) context.Context
- func WithCustomContextFromGinRequest(c *gin.Context, appSource string) context.Context
- type CustomContext
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAppSourceFromContext ¶
func GetRolesFromContext ¶
func GetTenantFromContext ¶
func GetUserEmailFromContext ¶
func GetUserIdFromContext ¶
func SetAppSourceInContext ¶
func SetTenantInContext ¶
func ValidateTenant ¶
func WithContext ¶
func WithContext(customContext *CustomContext, next http.Handler) http.Handler
func WithCustomContext ¶
func WithCustomContext(ctx context.Context, customContext *CustomContext) context.Context
Types ¶
type CustomContext ¶
type CustomContext struct { AppSource string Tenant string UserId string UserEmail string Roles []string }
func GetContext ¶
func GetContext(ctx context.Context) *CustomContext
Click to show internal directories.
Click to hide internal directories.