tenantctx

package
v1.5.7 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AdminCtx

func AdminCtx(ctx context.Context) context.Context

AdminCtx returns a context with admin authority info.

func GetTenantAdminCtx

func GetTenantAdminCtx(ctx context.Context) bool

GetTenantAdminCtx returns true when context including admin authority info. If it returns true, the operation can be executed without tenant privacy layer.

func GetTenantIDFromCtx

func GetTenantIDFromCtx(ctx context.Context) uint64

GetTenantIDFromCtx returns tenant id from context. If error occurs, return default tenant ID.

Types

type TenantKey

type TenantKey string
const TenantAdmin TenantKey = "tenant-admin"

Jump to

Keyboard shortcuts

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