Documentation
¶
Index ¶
- func ContextualizeConfig(ctx context.Context, fb *config.Config) *config.Config
- func ContextualizeMiddleware(ctx context.Context) func(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc)
- func ContextualizeNID(ctx context.Context, fallback uuid.UUID) uuid.UUID
- func ContextualizeTableName(ctx context.Context, name string) string
- func SetContextualizer(cc Contextualizer)
- type ContextNoOp
- func (*ContextNoOp) ContextualizeConfig(ctx context.Context, fb *config.Config) *config.Config
- func (*ContextNoOp) ContextualizeMiddleware(_ context.Context) func(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc)
- func (*ContextNoOp) ContextualizeNID(_ context.Context, fallback uuid.UUID) uuid.UUID
- func (*ContextNoOp) ContextualizeTableName(_ context.Context, name string) string
- type Contextualizer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContextualizeConfig ¶
func ContextualizeMiddleware ¶
func ContextualizeMiddleware(ctx context.Context) func(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc)
func SetContextualizer ¶
func SetContextualizer(cc Contextualizer)
Types ¶
type ContextNoOp ¶
type ContextNoOp struct{}
func (*ContextNoOp) ContextualizeConfig ¶
func (*ContextNoOp) ContextualizeMiddleware ¶
func (*ContextNoOp) ContextualizeMiddleware(_ context.Context) func(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc)
func (*ContextNoOp) ContextualizeNID ¶
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
Click to show internal directories.
Click to hide internal directories.