middlewares

package
v1.1.7 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Bearer authType = "Bearer"
	Basic  authType = "Basic"
	Query  authType = "Query"
	None   authType = "None"
)

Variables

This section is empty.

Functions

func TemplateBody added in v1.1.7

func TemplateBody(data map[string]interface{}, VARIABLES any) (map[string]interface{}, bool, error)

func TemplatePath added in v1.1.7

func TemplatePath(reqUrl *url.URL, VARIABLES any) (string, bool, error)

func TemplateQuery added in v1.1.7

func TemplateQuery(reqUrl *url.URL, data map[string]interface{}, VARIABLES any) (string, map[string]interface{}, bool, error)

Types

type AuthMiddleware

type AuthMiddleware struct {
	Next   http.Handler
	Tokens []string
}

func (AuthMiddleware) Use

func (data AuthMiddleware) Use() http.Handler

type BodyMiddleware

type BodyMiddleware struct {
	Next           http.Handler
	MessageAliases []MessageAlias
}

func (BodyMiddleware) Use

func (data BodyMiddleware) Use() http.Handler

type EndpointsMiddleware

type EndpointsMiddleware struct {
	Next             http.Handler
	BlockedEndpoints []string
}

func (EndpointsMiddleware) Use

func (data EndpointsMiddleware) Use() http.Handler

type LogMiddleware

type LogMiddleware struct {
	Next http.Handler
}

func (LogMiddleware) Use

func (data LogMiddleware) Use() http.Handler

type MessageAlias

type MessageAlias struct {
	Alias string
	Score int
}

type TemplateMiddleware

type TemplateMiddleware struct {
	Next      http.Handler
	Variables map[string]interface{}
}

func (TemplateMiddleware) Use

func (data TemplateMiddleware) Use() http.Handler

Jump to

Keyboard shortcuts

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