middleware

package
v0.0.0-...-5a6b2d2 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2023 License: Apache-2.0 Imports: 14 Imported by: 2

Documentation

Overview

Package middleware provides a set of common middleware for use with web application.

It provides the following middleware: gin middleware, gqlgen middleware

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterTenantID

func RegisterTenantID() web.Option

RegisterTenantID register middleware to get tenant id from request header

func RegisterTokenSigner

func RegisterTokenSigner() web.Option

RegisterTokenSigner register middleware to sign request

func SimplePagination

func SimplePagination() graphql.ResponseMiddleware

SimplePagination is a middleware that parses the query string for the simple (similar limit,offset) pagination use it like:

gqlsrv.AroundResponses(gqlx.SimplePagination())

func TenantIDMiddleware

func TenantIDMiddleware(cfg *conf.Configuration) gin.HandlerFunc

TenantIDMiddleware returns middleware to get tenant id from http request

Types

type TenantConfig

type TenantConfig struct {
	Lookup     string
	RootDomain string
	Exclude    []string
	Skipper    handler.Skipper
}

TenantConfig is the configuration for TenantIDMiddleware

Jump to

Keyboard shortcuts

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