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: 2

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