iris

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2023 License: MIT Imports: 5 Imported by: 0

README

iris adapter

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

Jump to

Keyboard shortcuts

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