Documentation ¶
Index ¶
- Constants
- type AppMiddleware
- type AuthChecker
- type RequestMiddleware
- func (m *RequestMiddleware) Authorization(next http.Handler) http.Handler
- func (m *RequestMiddleware) CORSProtection(next http.Handler) http.Handler
- func (m *RequestMiddleware) LogRequests(next http.Handler) http.Handler
- func (m *RequestMiddleware) ReadinesslivenessProbe(next http.Handler) http.Handler
- func (m *RequestMiddleware) SetupMiddleware(gw *runtime.ServeMux) *http.ServeMux
Constants ¶
View Source
const ( URI_ROOT = "/" API_PREFIX = "/v1/users" )
View Source
const ( EP_LIVENESS = "/liveness" EP_READUNESS = "/readiness" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppMiddleware ¶
type AuthChecker ¶
type RequestMiddleware ¶
type RequestMiddleware struct {
// contains filtered or unexported fields
}
func NewMiddleware ¶
func NewMiddleware(ac AuthChecker, l *logrus.Entry) *RequestMiddleware
func (*RequestMiddleware) Authorization ¶
func (m *RequestMiddleware) Authorization(next http.Handler) http.Handler
Authorization auth for admin section
func (*RequestMiddleware) CORSProtection ¶
func (m *RequestMiddleware) CORSProtection(next http.Handler) http.Handler
CORSProtection performs CORS protection
func (*RequestMiddleware) LogRequests ¶
func (m *RequestMiddleware) LogRequests(next http.Handler) http.Handler
LogRequests print to log URL of each request
func (*RequestMiddleware) ReadinesslivenessProbe ¶
func (m *RequestMiddleware) ReadinesslivenessProbe(next http.Handler) http.Handler
func (*RequestMiddleware) SetupMiddleware ¶
func (m *RequestMiddleware) SetupMiddleware(gw *runtime.ServeMux) *http.ServeMux
Click to show internal directories.
Click to hide internal directories.