tenants

package
v0.0.0-...-50a15a0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromTenantContext

func FromTenantContext(ctx context.Context) string

func HTTPServerMiddleware

func HTTPServerMiddleware() ncsfw.MiddlewareFunc

func HTTPServerWithConfig

func HTTPServerWithConfig(cfg Config) ncsfw.MiddlewareFunc

func SetTenantWithContext

func SetTenantWithContext(c context.Context, tenant string) (context.Context, error)

Types

type Config

type Config struct {
	Lookup Lookup

	HeaderKey string
}

type LoginUserTenant

type LoginUserTenant interface {
	GetTenant() string
}

type Lookup

type Lookup int
const (
	LoginUser Lookup = iota
	Header
)

Jump to

Keyboard shortcuts

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