tenant

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2023 License: Apache-2.0 Imports: 3 Imported by: 3 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package tenant provides multi-tenancy helpers

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateKey

func CreateKey(ctx context.Context, key string) string

CreateKey generated a unique key for a resource

func FromAccount

func FromAccount(acc *auth.Account) string

FromAccount returns a tenant from

func FromContext

func FromContext(ctx context.Context) (string, bool)

FromContext returns a tenant from the context

func Id added in v0.26.0

func Id(ctx context.Context) string

Get the tenant and default where needed

func NewContext added in v0.25.0

func NewContext(id, issuer, owner string) context.Context

NewContext returns a context that will encapsulate the given tenant

Types

This section is empty.

Jump to

Keyboard shortcuts

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