Documentation ¶
Overview ¶
Package middleware - infrastructure/middleware
Package middleware - infrastructure/middleware
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthConfig ¶
type AuthConfig struct { ErrorMessages map[int]map[string]string Context func(r *http.Request, authenticatedKey string) Debug bool Client func(key, secret string) bool }
AuthConfig config for the middleware
type CsrfMiddleware ¶
type CsrfMiddleware struct {
// contains filtered or unexported fields
}
CsrfMiddleware struct
func NewCsrfMiddleware ¶
func NewCsrfMiddleware(name string) *CsrfMiddleware
NewCsrfMiddleware constructor
func (*CsrfMiddleware) ServeHTTP ¶
func (m *CsrfMiddleware) ServeHTTP(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)
ServeHTTP mandatory middleware part
type RESTGate ¶
type RESTGate struct {
// contains filtered or unexported fields
}
RESTGate middleware
func NewAuthMiddleware ¶
func NewAuthMiddleware(headerKeyLabel string, headerSecretLabel string, config AuthConfig) *RESTGate
NewAuthMiddleware new Auth Middleware
func (*RESTGate) ServeHTTP ¶
func (rest *RESTGate) ServeHTTP(w http.ResponseWriter, req *http.Request, next http.HandlerFunc)
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
Session struct
func (*Session) ServeHTTP ¶
func (a *Session) ServeHTTP(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc)
ServeHTTP mandatory middleware part
type UserMiddleware ¶
type UserMiddleware struct {
// contains filtered or unexported fields
}
UserMiddleware struct
func NewUserMiddleware ¶
func NewUserMiddleware(c *UserMiddlewareConfig) *UserMiddleware
NewUserMiddleware constructor
func (*UserMiddleware) ServeHTTP ¶
func (m *UserMiddleware) ServeHTTP(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)
ServeHTTP mandatory middleware part
type UserMiddlewareConfig ¶
UserMiddlewareConfig config for UserMiddleware
Click to show internal directories.
Click to hide internal directories.