tenantctx

package
v1.4.10-beta Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const TenantAdmin string = "tenant-admin"

Variables

This section is empty.

Functions

func AdminCtx added in v1.4.5

func AdminCtx(ctx context.Context) context.Context

AdminCtx returns a context with admin authority info.

func GetTenantAdminCtx added in v1.4.5

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

This section is empty.

Jump to

Keyboard shortcuts

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