middleware

package
v0.0.1-alpha Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GetParams

type GetParams struct {
	Tags          []string
	ExcludeAuth   bool
	ExcludeGlobal bool
}

type Registry

type Registry struct {
	// contains filtered or unexported fields
}

func NewRegistry

func NewRegistry() *Registry

func (*Registry) Get

func (r *Registry) Get(params GetParams) (result []transport.Middleware)

Get returns a list of Middleware for the given tags "global" middleware are always returned as a part of the list "auth" middleware are always returned if a tag of "public" is not specified

func (*Registry) Register

func (r *Registry) Register(item RegistryItem)

Register takes a MiddlewareSetItem and adds it to the cache for each of its tags

type RegistryItem

type RegistryItem struct {
	Order      int
	Tags       []string
	Middleware transport.Middleware
}

Jump to

Keyboard shortcuts

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