corp

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: May 30, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContextualizeConfig

func ContextualizeConfig(ctx context.Context, fb *config.Config) *config.Config

func ContextualizeMiddleware

func ContextualizeMiddleware(ctx context.Context) func(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc)

func ContextualizeNID

func ContextualizeNID(ctx context.Context, fallback uuid.UUID) uuid.UUID

func ContextualizeTableName

func ContextualizeTableName(ctx context.Context, name string) string

func SetContextualizer

func SetContextualizer(cc Contextualizer)

Types

type ContextNoOp

type ContextNoOp struct{}

func (*ContextNoOp) ContextualizeConfig

func (*ContextNoOp) ContextualizeConfig(ctx context.Context, fb *config.Config) *config.Config

func (*ContextNoOp) ContextualizeMiddleware

func (*ContextNoOp) ContextualizeMiddleware(_ context.Context) func(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc)

func (*ContextNoOp) ContextualizeNID

func (*ContextNoOp) ContextualizeNID(_ context.Context, fallback uuid.UUID) uuid.UUID

func (*ContextNoOp) ContextualizeTableName

func (*ContextNoOp) ContextualizeTableName(_ context.Context, name string) string

type Contextualizer

type Contextualizer interface {
	ContextualizeTableName(ctx context.Context, name string) string
	ContextualizeMiddleware(ctx context.Context) func(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc)
	ContextualizeConfig(ctx context.Context, fb *config.Config) *config.Config
	ContextualizeNID(ctx context.Context, fallback uuid.UUID) uuid.UUID
}

func GetContextualizer

func GetContextualizer() Contextualizer

Jump to

Keyboard shortcuts

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