Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MultiTenancy ¶
func MultiTenancy(ts saas.TenantStore, options ...Option) gin.HandlerFunc
Types ¶
type ErrorFormatter ¶
var ( DefaultErrorFormatter ErrorFormatter = func(context *gin.Context, err error) { if errors.Is(err, saas.ErrTenantNotFound) { context.AbortWithError(404, err) } else { context.AbortWithError(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.