middleware

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: May 16, 2023 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Middleware

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

func New

func New(a *app.App) *Middleware

func (*Middleware) Headers added in v1.3.0

func (m *Middleware) Headers(next http.Handler) http.Handler

func (*Middleware) Log

func (m *Middleware) Log(next http.Handler) http.Handler

func (*Middleware) Lv1Auth

func (mw *Middleware) Lv1Auth(next http.HandlerFunc) http.HandlerFunc
Level 1 authentication
 Performs IP whitelist and API key checks against what's allowed (if they're enabled in the config).
 This should be used as the basic authentication

---

func (*Middleware) Lv2Auth

func (mw *Middleware) Lv2Auth(next http.HandlerFunc) http.HandlerFunc
Level 2 authentication
 Performs level 1 authentication and user agent check.
 This should be used to make sure the request came from msr game server.

---

func (*Middleware) NoAuth

func (mw *Middleware) NoAuth(next http.HandlerFunc) http.HandlerFunc
no authentication
 Does not do any authentication

---

func (*Middleware) PanicRecovery

func (m *Middleware) PanicRecovery(next http.Handler) http.Handler

Jump to

Keyboard shortcuts

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