Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MultiTenancy ¶
func MultiTenancy(ts saas.TenantStore, options ...Option) iris.Handler
Types ¶
type ErrorFormatter ¶
type ErrorFormatter func(context iris.Context, err error)
var ( DefaultErrorFormatter ErrorFormatter = func(context iris.Context, err error) { if errors.Is(err, saas.ErrTenantNotFound) { context.StopWithError(404, err) } else { context.StopWithError(500, err) } } )
type Option ¶
type Option func(*option)
func WithErrorFormatter ¶
func WithErrorFormatter(e ErrorFormatter) Option
func WithMultiTenancyOption ¶
func WithMultiTenancyOption(opt *http.WebMultiTenancyOption) Option
func WithResolveOption ¶
func WithResolveOption(opt ...saas.ResolveOption) Option
Click to show internal directories.
Click to hide internal directories.