Documentation
¶
Index ¶
- type Middleware
- func (m *Middleware) Headers(next http.Handler) http.Handler
- func (m *Middleware) Log(next http.Handler) http.Handler
- func (mw *Middleware) Lv1Auth(next http.HandlerFunc) http.HandlerFunc
- func (mw *Middleware) Lv2Auth(next http.HandlerFunc) http.HandlerFunc
- func (mw *Middleware) NoAuth(next http.HandlerFunc) http.HandlerFunc
- func (m *Middleware) PanicRecovery(next http.Handler) http.Handler
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) 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
Click to show internal directories.
Click to hide internal directories.