custom_middleware

package
v0.0.0-...-388b756 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultApiKeyConfig = ApiKeyConfig{
		Skipper:       middleware.DefaultSkipper,
		QueryKeyName:  "key",
		HeaderKeyName: "API-KEY",
	}
)

Functions

This section is empty.

Types

type ApiKey

type ApiKey struct {
	Key    string
	Header bool
	Config ApiKeyConfig
}

func NewApiKey

func NewApiKey() *ApiKey

func NewApiKeyWithConfig

func NewApiKeyWithConfig(config ApiKeyConfig) *ApiKey

func (*ApiKey) Handler

func (a *ApiKey) Handler(next echo.HandlerFunc) echo.HandlerFunc

type ApiKeyConfig

type ApiKeyConfig struct {
	Skipper middleware.Skipper

	QueryKeyName  string
	HeaderKeyName string
}

Jump to

Keyboard shortcuts

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